Top "Angular-services" questions

Angular services are substitutable objects that are wired together using dependency injection.

Passing data between controllers in Angular JS?

I have a basic controller that displays my products, App.controller('ProductCtrl',function($scope,$productFactory){ $productFactory.get().success(function(data){ $…

javascript angularjs angular-services
angular.service vs angular.factory

I have seen both angular.factory() and angular.service() used to declare services; however, I cannot find angular.service anywhere …

angularjs angular-services
AngularJS : How to watch service variables?

I have a service, say: factory('aService', ['$rootScope', '$resource', function ($rootScope, $resource) { var service = { foo: [] }; return service; }]); And …

angularjs watch angular-services
@HostBinding and @HostListener: what do they do and what are they for?

In my meanderings around the world wide interweb, and now especially the angular.io style docs, I find many references …

angular angular-services
Angular 4+ ngOnDestroy() in service - destroy observable

In an angular application we have ngOnDestroy() lifecycle hook for a component / directive and we use this hook to unsubscribe …

angular rxjs observable angular-services
How to make a synchronous call in angular 5?

So, I was trying to get the solution of this problem. But, somehow I am unable to do so, May …

angular typescript service angular-services angular-components
Correct way Provide DomSanitizer to Component with Angular 2 RC6

I'm attempting to use DomSanitizer to sanitize a dynamic URL within a Component using I can't seem to figure out …

javascript angular typescript angular-services angular-dom-sanitizer
Passing current scope to an AngularJS Service

Is it correct to pass the "current" $scope to an AngularJS service? I'm in the situation where I've a $service …

angularjs data-binding angularjs-scope angular-services
use $http inside custom provider in app config, angular.js

The main question - is it possible? I tried with no luck.. main app.js ... var app = angular.module('myApp', […

javascript angularjs angular-services