angulardart / angular

Fast and productive web framework provided by Dart
https://pub.dev/packages/angular
MIT License
1.83k stars 231 forks source link

Why isn't the ngFactory coupled to the Component's class? #1982

Open jodinathan opened 3 years ago

jodinathan commented 3 years ago

Hello,

Thanks for the hard work with Angular!
We really like this project.

We have an internal (for now) version of Angular that has some tweaks and we will start migrating to Angular 7 and NNBD soon. As we do that we thought in making the components tightly coupled to the generated code. Basically, instead of generating stuff into .dart_tool we would make it generate the code in the same folder as the class and make the class extend the generated code. Pretty much like any other source generator package out there.

By letting the template directly use the class file through part of binding we aim to:

However, before we dig into that, we would like to know if you could please share info that could make we not follow that path or any suggestions/info at all.