dustinspecker / generator-ng-poly

Yeoman generator for modular AngularJS apps with Gulp and optional Polymer support
MIT License
237 stars 50 forks source link

Issue 316 #325

Closed jeffarese closed 8 years ago

jeffarese commented 8 years ago

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?

Example of a directive named exampleComponent created with controllerAs syntax:

screenshot from 2016-06-02 12-41-47

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 97.983% when pulling 78c0bf092ca8fc7e314b03ed105bc3881e335fc6 on Jeffarese:issue-316 into ca0259590d316034a44967d09cefad300fe0028a on dustinspecker:master.

dustinspecker commented 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.

jeffarese commented 8 years ago

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:

dustinspecker commented 8 years ago

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.

jeffarese commented 8 years ago

No problem ;) happy to provide a little support!