- does a $http.get() and
- uses .then() promise
the .then() promise will actually end up returning another promise that you can wire up to in your controller(where you are using this custom service). Also, note that in this scenario you are likely to use the revealing module pattern - like using a factory to return an object that you need instantiate, in order to use the custom service. This is different from the regular service singleton you get when using the built-in angular services.
It's really great and easy to understand if you are new to AngularJS. Thanks!
ReplyDeleteAngularjs Training | Angularjs Online Training
angular2 Training in Chennai | angular2 Training in Chennai
Angular 2 Training in Chennai | Angularjs Training | Angularjs Training | Angular 2 Training in Chennai | Angular 2 Online Training