Open justusromijn opened 8 years ago
Yeah, so we'ved moved all of the default views created by the generator to use controllerAs, etc, but the route subgenerator isn't a part of this generator. It's actually part of a different repository (generator-ng-component) that we include and call into from this generator. I know I still have to go and add an option to use newer syntax in the other generator (classes, controllerAs, etc), I just haven't gotten around to it.
Allright, I'll check if I have some time to set up a PR for it.
Op zondag 10 januari 2016 heeft Andrew Koroluk notifications@github.com het volgende geschreven:
Yeah, so we'ved moved all of the default views created by the generator to use controllerAs, etc, but the route subgenerator isn't a part of this generator. It's actually part of a different repository ( generator-ng-component https://github.com/DaftMonk/generator-ng-component) that we include and call into from this generator. I know I still have to go and add an option to use newer syntax in the other generator (classes, controllerAs, etc), I just haven't gotten around to it.
— Reply to this email directly or view it on GitHub https://github.com/angular-fullstack/generator-angular-fullstack/issues/1544#issuecomment-170387180 .
Currently, when I generate new routes or controllers, it will inject $scope by default. However, Angular supports (and is moving to) binding to controllers, so you won't be needing $scope anymore. Syntax is then for a route:
And the controller: