What is the use of BrowserModule in angular?
William Brown
Updated on June 15, 2026
.
Then, what is BrowserModule in angular?
BrowserModule – The browser module is imported from @angular/platform-browser and it is used when you want to run your application in a browser. CommonModule – The common module is imported from @angular/common and it is used when you want to use directives - NgIf, NgFor and so on.
Similarly, what is the use of entryComponents? The entryComponents array is used to define only components that are not found in html and created dynamically with ComponentFactoryResolver . Angular needs this hint to find them and compile. All other components should just be listed in the declarations array.
One may also ask, what is the use of common module in angular?
CommonModulelink. Exports all the basic Angular directives and pipes, such as NgIf , NgForOf , DecimalPipe , and so on. Re-exported by BrowserModule , which is included automatically in the root AppModule when you create a new app with the CLI new command.
What is import in angular?
An import is what you put in the imports property of the @NgModule decorator. It enables an Angular module to use functionality that was defined in another Angular module. An export what you put is the exports property of the @NgModule decorator.
Related Question Answers