One question is interesting to me with this awesome Angular update: are there any significant performance differences between the two approaches? Or itβs only a matter of mental models and levels of abstractions at this stage?
π¨βπ« Co-Founder of This is Learning, Organizer of AarhusJS
βοΈ Writer, Speaker, FOSS Maintainer π Author
π Microsoft MVP π GitHub Star
π Nx Champion π¦Έ Angular Hero of Education
My guess it's negligible but I imagine there could be a difference in compilation speed between a classic (NgModule-based) Angular application and a standalone Angular application.
The Angular team has suggested that a standalone component introduces a special injector. I'm not sure if or how this will affect runtime performance.
βοΈ Get contents on Javascript(and frameworks) basic to advanced topics with tips and tricks.
Follow on Instagram - @codecraftjs.
Available for Paid Mentoring π» .
Master Javascript!
With the latest updates ,Angular is trying to achieve more of the functional approach. By introducing the functional based directives , resolvers, guards, it has opened the door for the component to be more independent, segregated. This allows the code to be more flexible. Tree shaking becomes easy as the code is not tightly bound with this approach.
For ex: The injector function eliminates the dependency for the service to be added in the constructor . This make the inheritance easy. A class can be inherited without using the super constructor to be called if the base class is using any service.
Also, the dependency can be lazy loaded based on its usage.
All these powers up the component to stand alone firmly!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One question is interesting to me with this awesome Angular update: are there any significant performance differences between the two approaches? Or itβs only a matter of mental models and levels of abstractions at this stage?
My guess it's negligible but I imagine there could be a difference in compilation speed between a classic (NgModule-based) Angular application and a standalone Angular application.
The Angular team has suggested that a standalone component introduces a special injector. I'm not sure if or how this will affect runtime performance.
With the latest updates ,Angular is trying to achieve more of the functional approach. By introducing the functional based directives , resolvers, guards, it has opened the door for the component to be more independent, segregated. This allows the code to be more flexible. Tree shaking becomes easy as the code is not tightly bound with this approach.
For ex: The injector function eliminates the dependency for the service to be added in the constructor . This make the inheritance easy. A class can be inherited without using the super constructor to be called if the base class is using any service.
Also, the dependency can be lazy loaded based on its usage.
All these powers up the component to stand alone firmly!