Open sarod opened 6 years ago
@sarod thanks for posting your findings. I've got the same issue, and your suggestion to use /@ngInject/ before the constructor sort of worked for me.
This got the plugin to actually run, but the place that it inserts the $inject statement wasn't right and caused problems at runtime.
I'll see if I can add some failing unit tests...
When using the following code angularjs-annotate fails to annotate the class if the class is transpiled to ES5
The problem can be reproduced on the demo page https://schmod.github.io/babel-plugin-angularjs-annotate/ with the transform checkbox checked
Note that this works fine if the class is not exported.
I found several alternative placement of the @ngInject that work.
It 1 also works if I use an alias for export