Closed davidreher closed 8 years ago
What works is using 'ngInject'
in the constructor, but it would be great to have the other one working as well ;)
Using /*ngInject*/
with transpilers is brittle because they tend to rearrange things. "ngInject"
is the way to go!
Here is an example, if you are parsing the thread and wondering if it's what you are looking for:
export default class ItineraryItemService {
constructor/* @ngInject*/($rootScope, Config, ItineraryItem) {
...
}
...
export default class ItineraryItemService {
constructor($rootScope, Config, ItineraryItem) {
'ngInject';
...
}
...
Thank you for the help, @olov !
I have some code which looks like this:
after running it through babel, I am getting the following:
When I run this through ng-annotate nothing happens. But it should add the following:
or
how to get around this issue?
I am using ng-annotate 1.2.0