I am new to Angular 2. I have seen in every project there is plugin called platform-browser
.
"@angular/platform-browser": "2.0.0-rc.4", "@angular/platform-browser-dynamic": "2.0.0-rc.4",
I don't really know what is the usage of it. Someone can please explain me - What is the usage of platform-browser
? - What is the problem if we not use platform-browser
?
@angular/platform-browserlink. Supports execution of Angular apps on different supported browsers. The BrowserModule is included by default in any app created through the CLI, and it re-exports the CommonModule and ApplicationModule exports, making basic Angular functionality available to the app.
BrowserModule provides services that are essential to launch and run a browser application. BrowserModule also re-exports CommonModule from @angular/common , which means that components in the AppModule also have access to the Angular directives every application needs, such as NgIf and NgFor .
AngularJS is 100% JavaScript, 100% client-side and compatible with both desktop and mobile browsers.
What Is a Dynamic Infrastructure Platform? A dynamic infrastructure platform is a system that provides computing resources, particularly servers, storage, and networking, in a way that they can be programmatically allocated and managed.
Your Angular application can start off in many ways, but when you run on the browser you have a specific way of bootstrapping the application and that is defined in @angular/platform-browser-dynamic
.
In short these packages contain angular features which make getting an Angular app up and running possible in the browser. Bootstrapping
is essential and one of those features.
You can omit this when your target is not to develop the app to run on browser otherwise it is essential.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With