LinkedIn Login through Javascript

Requirement- Client Id

// Initialize linkedin API
<script type="text/javascript" src="">
 api_key: CLIENT ID
 authorize: true
 scope: r_basicprofile r_emailaddress
 onLoad: onLinkedInLoad
<script type="text/javascript">
  // After Authentication of Account
 function onLinkedInLoad() {
 IN.Event.on(IN, "auth", getProfileData);

 //After successfully Login 
 function onSuccess(data) {

 // Error in API call
 function onError(error) {

 // Get the needed Data
 function getProfileData() {
// destroy the session of linkedin
function closeSession(){
 return true;
<script type="in/Login"></script>

For custom Button

<script type="text/javascript">
//Invoke login window
function liAuth(){
<input type="button" onclick="liAuth()" value="Login"/>
Share on Google+Share on FacebookTweet about this on TwitterEmail this to someone

How to add the page loader in angularJS??

To add the page loader , we need to determine the http request sent by us has been responded or not.

For this simple query we need to evaluate just the value of following expression.


Following directive can be used anywhere to install loader the page on loading:-



   .directive('loading',   ['$http' ,function ($http)
        return {
            restrict: 'A',
            link: function (scope, elm, attrs)
                scope.isLoading = function () {
                    return $http.pendingRequests.length > 0;

                scope.$watch(scope.isLoading, function (v)


In View Page :-

Where spinner is the class you want to add as animation or loading image.

More about
Http Request

Share on Google+Share on FacebookTweet about this on TwitterEmail this to someone
Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.