Closed jeffarese closed 8 years ago
Thank you so much for this pull request! I really, really appreciate the work put into it and the description!
I'll try to review this later tonight/tomorrow. I apologize for the delay.
You're welcome :wink:
I'm using this generator on a big SPA with Angular 1.x and TypeScript and I want to help a little with the TypeScript support :smile:
Thank you very much for this PR! I apologize for the very late delay in getting this merged.
This has been rebased into master and will be released as soon as CI finishes.
No problem ;) happy to provide a little support!
What does this PR do?
This changes the way directives are created to use TypeScript classes when using the controllerAs syntax.
If the project uses controllerAs syntax, it creates the class and binds it as a controller to the directive object.
If the project don't use controllerAs syntax, it just creates the function as before, but creates the custom scope typing as an interface, extending the ng.IScope object.
Where should the reviewer start?
It should see that the directives are now using classes when using controllerAs
How should this be manually tested?
Documents
Example of a directive named exampleComponent created with controllerAs syntax: