babel-plugin-angularjs-annotate
babel-plugin-angularjs-annotate copied to clipboard
Add Angular 1.x dependency injection annotations to ES6 code
I've run into a bug where if a class method has the same name as an import, prefixed with an underscore, it shadows the import with the similar name. Brief...
When using the following code angularjs-annotate fails to annotate the class if the class is transpiled to ES5 ``` /*@ngInject*/ export class Broken { constructor($q) { } }box chec ```...
I encountered an error when the value of a `children` property was a function call, not an array. Specific example: ``` children: angular.copy(initialStateArrayThatIsReused) ``` I'm not experienced with Babel enough...
Run the following: ``` sh echo 'x => ({ x: () => x });' | babel --plugins transform-es2015-function-name ``` Expected output is the unchanged input: ``` js x => ({...
And probably with any other .module api I use webpack and angular ```js import angular from 'angular'; const MY_CONTROLLER = 'myController'; angular.module('myApp').controller(MY_CONTROLLER, $scope => {}); export default MY_CONTROLLER; ```
We currently do not handle cases like this: ``` js var ctrl = function(d){}; ctrl = function(e){} var c1 = { controller: ctrl } ctrl = function(f){}; var c2 =...
The following test-case from the original ng-annotate does not yet pass with the Babel plugin: ``` js Ctrl1.$inject = ["serviceName"]; // @ngInject // already has .$inject array (before function definition)...
Arrow functions cannot be safely used in providers or services, because these types are intended to be invoked with the `new` operator, and expect to have their own value of...