I’m looking at this example from Angular’s docs for $q but I think this probably applies to promises in general. The example below is copied verbatim from their docs...
  • May 26, 2022
  • 0 Comments
I have an AngularJS service that I want to initialize with some asynchronous data. Something like this: myModule.service('MyService', function($http) { var myData = null; $http.get('data.json').success(function (data) { myData =...
  • May 4, 2022
  • 0 Comments