pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://angular.dev/api/core/PlatformRef

theme === 'auto' && prefersDark)) { documentClassList.add(DARK_MODE_CLASS_NAME); } else { documentClassList.add(LIGHT_MODE_CLASS_NAME); } if (location.search.includes('uwu')) { documentClassList.add('uwu'); } PlatformRef • Angular
    • Overview
@angular/core

PlatformRef

Class
stable

The Angular platform is the entry point for Angular on a web page. Each page has exactly one platform. Services (such as reflection) which are common to every Angular application running on the page are bound in its scope. A page's platform is initialized implicitly when a platform is created using a platform factory such as PlatformBrowser, or explicitly by calling the createPlatform() function.

API

    
      class PlatformRef {}
    
    

bootstrapModuleFactory

Promise<NgModuleRef<M>>

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>>

bootstrapModule

Promise<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);

onDestroy

void

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

@paramcallback() => void
@returnsvoid

injector

Injector

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

destroy

void

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

@returnsvoid

destroyed

boolean

Indicates whether this instance was destroyed.

Jump to details
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy