Before Angular 14, It was mandatory to add modules to organize applicaiton with component hierarcy. After upgradation, we can optimize our code by removing modules and add dependancies to component level. What steps we need to consider while optimizing code?
I have removed app.module.ts and updated main.ts. How about other module level changes?
We have to update main.ts file. Instead of bootstrapModule, it need to call bootstapApplicaiton.
Changes in main.ts file
Upto Angular13: .bootstrapModule(AppModule)
Angular14+: bootstrapApplication(AppComponent, ...
Update component.ts file
add below directives in component level.
standalone: true, imports: [...], //Modules