WATCH NEXT: Angular Interview Questions and Answers - Dominate Your Next Interview - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5A_YKlVWMPo.htmlsi=2DCn7yspEAAJ2H6l
My developer experience has improved 5x since the release of standalone components. NgModules cause me sooo much frustration and friction. But now it's a pleasure. Also keep in mind, Angular gives instructions and some CLI commands to convert an app to be module-less.
This is a new way of Angular. Now they say that ngModules are optional which means it will soon transition to standalone like it was with hooks inside React
Here are videos about my setup. Config files are in the descriptio. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-j6uqOvTRq6I.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YrLiugDhCuk.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Xa4aOOB7XZo.html
if I remove completely the app.module, do I need to import everything I need in every component? for ex. I have to import "RouterLink" in every component I will use it? is there a way to make some imports public in all components? I think modules did exactly this, right? XD
Unfortunately you are totally right There are no “global imports”: you need to import a component/pipe/directive every time you use it. ngIf, ngFor, and friends are available in every standalone component generated by the CLI, as the skeleton includes the import of CommonModule. But routerLink for example is not: you need to import RouterModule if you need it. Other frameworks, like Vue for example, allow registering some components globally, to avoid importing them over and over. That’s not the case in Angular.
@@MonsterlessonsAcademy oh I see thank you. I will try using this paradigm, but I think for now it is best to continue using ngModules for practicity in the imports :( at least this gave me a better understanding of how ngModules work 💯