Top "Angularjs-service" questions

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

can't get service instance from $injector.get()

I define a customer service named "greeting", but can't get the instance from $injector.get('greeting'). It will throw such …

angularjs angularjs-service
How to mock $window.location.replace in AngularJS unit test?

I've got the following service: angular.module("services") .factory("whatever", function($window) { return { redirect: function() { $window.location.replace("http://www.…

javascript unit-testing angularjs mocking angularjs-service
How to enable cors request with angular.js-resource

I have an angular.js application and i need to do CORS request. I want to define my rest services "…

angularjs cors angularjs-service
AngularJS: How to pass values from Controller to Service Method?

I have a controller which is dependent on a TransactionService. One of the method is $scope.thisMonthTransactions = function () { $scope.resetTransactions(); …

javascript angularjs angularjs-scope angularjs-service
Angular - TypeError: XX is not a function

Maybe I'm missing some kind of property, but I'm follow this project and I'm getting this error in my controller. …

javascript angularjs angularjs-scope angularjs-service angularjs-factory
AngularJS : passing params from controller to service

I'm having trouble on figuring out how to pass parameters from my angular controller to service #my controller 'use strict'; …

angularjs angularjs-scope angularjs-service angularjs-controller
$watch inside a service?

Is it possible to set up a $watch on an array of objects inside a service (I'd like the $watch …

angularjs angularjs-service
AngularJS: How to handle success and error call backs with ngResource?

The docs does not give any idea about it. My REST enpoint might throw error $scope.delete = function(index) { Transaction.…

javascript angularjs angularjs-service
Inject dateFilter in a service in AngularJs

I would like to know if there is a way to inject the filters in a service in AngularJs. I've …

javascript angularjs angularjs-service
Unknown provider CookieStore

I am having service where I want to use the $cookieStore module. It works fine, but when unit testing it …

angularjs jasmine angularjs-service karma-runner