Using loader in between service ng

myApp.factory('myService', function($http) {

    var getData = function() {

        return $http({method:"GET", url:"/my/url"}).then(function(result){
            return result.data;
        });
    };
    return { getData: getData };
});


function myFunction($scope, myService) {
    var myDataPromise = myService.getData();
    myDataPromise.then(function(result) {  // this is only run after $http completes
       $scope.data = result;
       console.log("data.name"+$scope.data.name);
    });
}

ng Power

https://www.airpair.com/js/javascript-framework-comparison

Other options

 

JavaScript Templating     around 400mb
1h 57m Intermediate Apr 25, 2014

Up and Running with Underscore.js  around 500mb
2h 0m Intermediate Nov 04, 2013
 
Up and Running with Backbone.js   around 300mb
1h 34m Intermediate Jun 10, 2014

Web Project Workflows with Gulp.js, Git, and Browserify
2h 40m Intermediate Jun 23, 2014  around 400mb