0

How Angular2 component inheritance (e.g. inputs reuse) can be implemented with Dart? Found number of issues on github, but seems that it will not be supported by default in Angular2. Also found workaround, but looks like it's applicable on TypeScript only.

Community
  • 1
  • 1
Adamovskiy
  • 1,376
  • 1
  • 12
  • 42
  • This is possible with Angular 4: https://medium.com/dartlang/annotate-once-angulardart-825479b1e78f – CedX Oct 17 '17 at 01:08

1 Answers1

1

That's not supported in general and also not for Dart.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
  • I understood, but maybe is there some workaround (like `@Component` extension) to reuse specific subset of `@Component` parameters? – Adamovskiy Jul 18 '16 at 12:37
  • I'm pretty sure there isn't. I wouldn't build on the mentioned TS workaround as well because it probably won't work with several features (like Universal or offline template compiler) and is prone to break at any time without notification anyway. – Günter Zöchbauer Jul 18 '16 at 12:38
  • Ok about `ComponentMetadata` fields, but is it some known bug that when component class extends one that implements some lifecycle hook, it doesn't works? – Adamovskiy Jul 18 '16 at 12:47
  • There are a few issues like https://github.com/angular/angular/issues/6781, https://github.com/angular/angular/issues/5415. Maybe others, don't remember. – Günter Zöchbauer Jul 18 '16 at 12:50
  • It's sad.. Thanks a lot! – Adamovskiy Jul 18 '16 at 12:54