Angular 17 Tutorial #12 - No AppModule | Angular 17 Tutorial For Beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi friends welcome back to AR tutorials this is angular 17 full tutorial series for absolute beginners as well as expert developers from previous versions till angular 16 if you for following any of the tutorials from me or anybody we would have told you that every angular application requires a one module mandatory which is app module but from angular 17 onwards there is no such requirement angular 17 onwards there is no mandatory module that is required that means in your projects you will not see app module at all thanks to one of our subscriber and viewer who brought this point to us in the comment section so and Hance this particular topic today a quick touch note on app module and app routes this is part 12 of the series if you have missed out on on the first 11 Parts make sure that you go through them in order to have continuity to your learning and master angular 17 with me all right today we are learning about no app module versus app module so remember the ground rule angular 17 onwards the projects are Standalone which means they are not really dependent on any module you can build a complete Project without any module but angular 16 and Below it's mandatory to have at least one module in your project which used to be called app module since angular 17 onwards it stand alone no modules are required and hence you will not see the file app. module. TS file it is not mandatory to have app module anymore in angular 17 but angular 16 and Below you will need a app module however remember this important point that does not mean that angular 7 17 does not support modules or you cannot create modules Etc we can still create modules we can still create lazy loading modules we can work with existing infrastructure on angular 17 as well it is Backward Compatible component Services pipes directives we used to have them inside a module to use them right now we can use them directly since they are Standalone all right so this is theoretical explanation let me show you in the code and I'll show you the code comparison between angular 16 and angular 17 project let's go all righty so I have two projects here if you are following my channel if you following my tutorials you will know that I created an angular crud application and to end uh which was called credit card admin make sure that you check out that tutorial as well I'm expanding the source and app in angular 16 and you would see that there is a app module Okay so so ab. module. TS is mandatory in angular 16 and Below but now if you expand the default vanilla angular 17 application you will see that there is no app module all right so this is very very important change because a lot of you have been asking me the difference so angular 17 versus angular 16 and Below all right so number one rule angular 16 and Below used app module it's mandatory to have at least one module okay and that module used to be app module it was given in bootstrap file that was the main thing that you Ed to bootstrap let me show you that real quick now you go to your app module main. PS and you have your app component this is angular 17 so I'll collapse it and go to angular 16 and go to main.ts and you would see app module okay so angular 16 and Below will have in main.ts you will bootstrap app module the default by default okay remember very very uh interesting difference angular 17 onwards everything is stand alone okay that means no mandatory modules module is required okay there is no app module anymore okay we but remember this I'm putting in caps but we can create our own customer own custom modules just like how you were doing doing in previous versions of angular okay we can create our own modules just like how you were doing NG generate module module name right just like this you can generate any number of modules in angular 17 okay remember just like how you were doing in angular 16 angular 17 is Backward Compatible okay angular 17 is Backward Compatible which means every everything that you were doing everything you were doing in angular 16 is still valid okay remember this very very important comparison points guys and hence there is no app module in angular 17 app module was mandatory till angular 16 and hence you see that okay now we bootstrap the app component directly here we were boot bootstrapping app module now in angular 17 we bootstrap app component instead of app module let me show you that also real quick if you're feeling I'm going back and forth into projects that was my intention because I want to compare both angular 16 and angular 17 to give you a good idea about both setup so open main.ts and now you see app component You Don't See app module in angular 16 and Below you would see app module in angular 17 you would see it as app component okay I hope now it's clear to you as to why there is no app module in angular 17 okay and in the next episode I am going to cover as to why there is no app routing module in angular 17 and what is the alternative I will also show you how to work with lazy loading module along with its own custom routing mod module all right so very very important uh differences like I said these are breaking changes hence it's very important for you to learn and master I hope you are enjoying this series and let's continue that learning I will try and publish daily two videos on angular 17 that way you can speed up your learning thank you so much for joining see you the next episode
Info
Channel: ARCTutorials
Views: 7,004
Rating: undefined out of 5
Keywords: angular 17 tutorial, angular 17 tutorial for beginners, angular 17 crud, angular 17 features, angular 17 full tutorial, angular 17 complete tutorial, angular 17 live project, angular 17 project, angular 17 crud tutorial, angular 17 best tutorial, angular 17, angular 17 signals, angular 17 defer, angular 17 components, angular 17 templates, angular 17 course, angular 17 full project, angular 17 routing, angular 17 crash course, angular 17 ssr
Id: t3rh6gTIYsI
Channel Id: undefined
Length: 7min 27sec (447 seconds)
Published: Mon Feb 12 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.