Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

configure backend mock resources with AngularJS $injector

Compare
Choose a tag to compare
@erkobridee erkobridee released this 11 Oct 02:49
· 11 commits to master since this release
  • regexpUrl

isolated in one scope, and added more intelligence, that's allow, configure some regexp using string or RegExp object

with this, now it's possible to configure resource, like service, factory or controller, with dependency injection

angular.mock.backend.addResource(function($rootScope, httpBackend, regexpUrl) { ... });

or

angular.mock.backend.addResource(
  [ '$rootScope', '$httpBackend', 'regexpUrl',
function(scope, httpBackend, regexpUrl) { ... }]);