You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.
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:
Remove exportAs.
Let the template use private stuff.
Make the generated class expose common things like the NgFactory and changeDetectionRef.markForCheck
Add methods to aid debugging
Comment the generated code with info so the dev can have a better understanding of what is happening
Allow implicit injection by making the original authored class only declare a getter.
Example: abstract class MyComponent extends _Ng { ParentComponent get parent; }
Would make the generated class have the parent property without having to use the constructor. Reasoning: We had a hard time refactoring components because the base class needed additional injections.
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.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:exportAs
.NgFactory
andchangeDetectionRef.markForCheck
Example:
abstract class MyComponent extends _Ng { ParentComponent get parent; }
Would make the generated class have the
parent
property without having to use the constructor. Reasoning: We had a hard time refactoring components because the base class needed additional injections.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.
The text was updated successfully, but these errors were encountered: