You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
It is impossible to define a provider that depends on another provider in the minified version of an application. The following code:
varmyApp=angular.module('myApp',[]).provider('crudRouteProvider',['$routeProvider',function(e){this.doSthWithRouteProvider=function(pathPrefix){//do something with $routeProvider here};this.$get=function(){return{};};}]);
Problem description
It is impossible to define a provider that depends on another provider in the minified version of an application. The following code:
will fail with
Uncaught Error: Provider crudRouteProvider must define $get factory method. from myApp. Here is the jsFiddle: http://jsfiddle.net/pkozlowski_opensource/FGkdD/1/Expected behavior
The unminified version works correctly, here is the jsFiddle: http://jsfiddle.net/pkozlowski_opensource/cHHJJ/
The minified version should behave exactly the same.