GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • createPlatform()
  • PlatformRef
  • NgModuleRef
  • Injector

This view

  • Original page
  • New address

GeezerVison is showing angular.dev — PlatformRef • Angular

API

    
      class PlatformRef {}
    
    
@param_injectorInjector
@returnsPlatformRef

Creates an instance of an @NgModule for the given platform.

@deprecated

Passing NgModule factories as the PlatformRef.bootstrapModuleFactory function argument is deprecated. Use the PlatformRef.bootstrapModule API instead.

@parammoduleFactoryNgModuleFactory<M>
@paramoptions(BootstrapOptions & { applicationProviders?: (Provider | EnvironmentProviders)[] | undefined; }) | undefined
@returnsPromise<NgModuleRef<M>>

Creates an instance of an @NgModule for a given platform.

@parammoduleTypeType<M>
@paramcompilerOptions(CompilerOptions & BootstrapOptions & { applicationProviders?: (Provider | EnvironmentProviders)[] | undefined; }) | (CompilerOptions & BootstrapOptions & { applicationProviders?: (Provider | EnvironmentProviders)[] | undefined; })[]
@returnsPromise<NgModuleRef<M>>
Usage notes

Simple Example

@NgModule({
  imports: [BrowserModule]
})
class MyModule {}

let moduleRef = platformBrowser().bootstrapModule(MyModule);

Registers a listener to be called when the platform is destroyed.

@paramcallback() => void
@returnsvoid

Retrieves the platform Injector, which is the parent injector for every Angular application on the page and provides singleton providers.

Destroys the current Angular platform and all Angular applications on the page. Destroys all modules and listeners registered with the platform.

@returnsvoid

Indicates whether this instance was destroyed.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.