Applying John Papa Style Guide to generator-ng-component#17
Applying John Papa Style Guide to generator-ng-component#17remicastaing wants to merge 7 commits intoDaftMonk:masterfrom remicastaing:jppsg
Conversation
- apply JPSG to controlle.jsr - remove $scope an replace by this - apply JPSG to controller.specs.js
- apply JPSG to decorator.js
- apply JPSG to directive.js
- apply JPSG to factory
- apply JPSG to filter
- apply JPSG to factory
- apply JPSG to route - use"controller as"
|
Hi @remicastaing, thanks for the work you've done here. A couple of thoughts... If we use https://github.com/johnpapa/angular-styleguide#style-y024, then we'll need to: FN.$inject = ['injectable1', 'injectable2', 'injectable3'];for every (controller|service|factory|provider)... So I am personally not 100% sold on that. Also, if we don't end up using named functions, then I don't really see a need in the IIFE's since we won't be polluting the global namespace. Other than that, I'm good with everything else (: |
|
Hello @kingcody. I didn't complied to rule y024, because it worked for me without. We should instead comply to https://github.com/johnpapa/angular-styleguide#style-y100 (comment functions that need automated dependency injection using I like to name functions because it's, IMO, more readable and the file is flatter, so I added IIFE to all files. |
Here is an attempt to comply to John Papa Style Guide as evoked in angular-fullstack/generator-angular-fullstack#1119.