olov / ng-annotate

Add, remove and rebuild AngularJS dependency injection annotations
MIT License
2.03k stars 152 forks source link

support angular 1.5 component() #226

Closed lukasz-karolewski closed 7 years ago

lukasz-karolewski commented 8 years ago

currently controller of the component is not properly annotated

olov commented 8 years ago

Please provide issues in the form of input, expected output, actual output. Include the version of ng-annotate and node that you are using. With pull requests, please include changes to the tests as well (tests/original.js, tests/with_annotations.js). https://github.com/olov/ng-annotate#issues-and-contributions

Frank3K commented 8 years ago

@kether667: This was added in 5bfb3b124efd29c920fe13e871e92549260d2f62. Make sure you have the latest gulp-ng-annotate and dependencies. I had the same issue and found out that not all dependencies were up to date.

lukasz-karolewski commented 8 years ago

thanks, yea gulp-ng-annotate specifies 'ng-annotate': '^1.0.0', which doesn't update when typing npm install

after i remove ng-annotate from node_modules it downloaded newest version

ghost commented 8 years ago

This isn't working quite right for me. Here's my source file: intTaskExcelImportConfig.txt

$ ng-annotate -a intTaskExcelImportConfig.txt > annotated.txt

Actual output: annotated.txt is identical to intTaskExcelImportConfig.txt

Expected output: I expected to see this line in annotated.txt: Ctrl.$inject = ["$scope", "$timeout", "LocalizationService"];

I did notice that if I add /@ngInject/ then I do get the expected output. It'd be great if I didn't have to manually add this to my components since I don't do it in my directives.

ng-annotate v1.2.1

olov commented 8 years ago

https://github.com/olov/ng-annotate/issues/245