Top "Angularjs-service" questions

AngularJS services are singletons that carry out specific tasks common to web apps.

How to inject service to angular constant

I would like to define a constant which use $locale service. Constants are objects, so I can't inject it as …

javascript angularjs dependency-injection constants angularjs-service
What does the underscores in _servicename_ mean in AngularJS tests?

In the following example test, the original provider name is APIEndpointProvider, but for injection and service instantiation the convention seems …

angularjs unit-testing jasmine angularjs-service
angularjs service is not a function

I have a service like so: app.service('Utilities', function() { this.sum = function(items, prop) { var count, total; total = 0; count = 0; …

javascript angularjs coffeescript angularjs-service
Simple Angular $routeProvider resolve test. What is wrong with this code?

I have created a simple Angular JS $routeProvider resolve test application. It gives the following error: Error: Unknown provider: dataProvider &…

angularjs angularjs-directive angularjs-service angularjs-routing angularjs-controller
AngularJs DELETE with data sets wrong content-type header

I am making a $http DELETE request with a payload but the content-type is wrong. I have a data object, …

angularjs angularjs-service
Initialize Angular Service (factory) when application start

In my Angular application I adding tracing functionality, which should work as separate plugin, so if script included into HTML …

javascript angularjs angularjs-service angularjs-factory
AngularJS API call error with $http GET

I'm trying to create a simple app using Angular that will consume my API. I'm using a VM to run …

javascript angularjs api angularjs-service angularjs-http
AngularJS - How do I avoid using $timeout to wait for an element to be created?

Here is the idea: So I am trying to use an external library function to create some manipulation in the …

angularjs angularjs-directive angularjs-service jsplumb angularjs-controller
how to reuse a function in multiple controllers

I have multiple controllers for multiple routes: app.controller('FirstController', function ($scope) { $scope.func = function () { console.log('route 1'); } } app.…

angularjs angularjs-directive angularjs-service