In the $scope of my controller, I have an object called myObject that is to be populated by a $http.get(...).
angular.module('myApp').controller('myController', ['$scope', function($scope) {
this.myObject={}; //object to be loaded by $http.get
//We initiate the request to load myObject.
$http({
url: '/myurl',
method: 'GET'
}).then(function(result){
this.myObject = result.data;
}, function(data, status){});
}]);
In the HTML view, there are a lot of directives that depend on myObject, and will return errors such as "Cannot read property 'xxx' of null" if it is run before the $http.get returns a response.
How would you go about pausing the directives being run before this.myObject is loaded?