Open mutoo opened 7 years ago
I confirm, the fix above addressed errors in my project as well. Thanks @mutoo!
I think this might go a bit deeper than just making sure that $rootScope gets injected into the provider.
When I run grunt-ng-annotate this line causes it to error. When I comment out that line the error disappears. grunt-ng-annotate completes fine otherwise.
I was using the ngAnnotate and uglifyjs in my project.
When I introduced the sample code into my file, it breaked the page after build.
It took a long time to find the reason before I awared that there is a dependency injection of $rootScope.
So I manually add the annotation for the sample code:
or you can just use the "ngInject" directive:
it works again!