Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Angular platform-browser?

Tags:

angular

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?

like image 752
Damith Avatar asked Jul 16 '16 04:07

Damith


People also ask

What is use of Angular 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.

What is Angular browser module?

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 .

Does Angular work with mobile browsers?

AngularJS is 100% JavaScript, 100% client-side and compatible with both desktop and mobile browsers.

What is platform dynamic?

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.


1 Answers

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.

  • Platform-browser-dynamic
  • Platform-browser
like image 69
Arpit Agarwal Avatar answered Oct 03 '22 23:10

Arpit Agarwal