DamianEdwards / grunt-tsng

A TypeScript pre-processor for AngularJS
Apache License 2.0
29 stars 3 forks source link

Auto-bind instance methods in directive classes #1

Closed DamianEdwards closed 10 years ago

DamianEdwards commented 10 years ago

When using TypeScript classes to create directives, the instance methods such as link need to be explicitly bound to the instance in the constructor due to the way AngularJS invokes them. We should add the code in the constructors to do this automatically.