ngParty / ng-metadata

Angular 2 decorators and utils for Angular 1.x
https://hotell.gitbooks.io/ng-metadata/content/
MIT License
355 stars 46 forks source link

`this` within Component LC hooks looses reference when 'target: es6' is used #192

Open Hotell opened 7 years ago

Hotell commented 7 years ago

See for detail #188

Hotell commented 7 years ago

also possible related issue https://github.com/Microsoft/TypeScript/issues/14591

benneq commented 5 years ago

I have this issue, too.

TypeScript 3.2.4 with target: es6 / es2015 AngularJS 1.7.6 ng-metadata 4.0.1 ng-annotate-patched 1.9.0 etc. pp.

I am 50% sure that I had it working today, once. Using ngOnInit = () => { ... }. But then I changed lot's of other stuff and now it won't work anymore... 😢 But maybe I was never working 😆 I'm not sure.