platform

export platform(providers?: Array<Type | Provider | any[]>) : PlatformRef

exported from angular2/core defined in angular2/src/core/application_ref.ts (line 85)

Initialize the Angular 'platform' on the page.

See PlatformRef for details on the Angular platform.

It is also possible to specify providers to be made in the new platform. These providers will be shared between all applications on the page. For example, an abstraction for the browser cookie jar should be bound at the platform level, because there is only one cookie jar regardless of how many applications on the page will be accessing it.

The platform function can be called multiple times as long as the same list of providers is passed into each call. If the platform function is called with a different set of provides, Angular will throw an exception.