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
  • ViewEncapsulation#Emulated

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — APP_ID • Angular

API

    
      const APP_ID: InjectionToken<string>;
    
    

Description

A DI token representing a string ID, used primarily for prefixing application attributes and CSS styles when ViewEncapsulation#Emulated is being used.

The token is needed in cases when multiple applications are bootstrapped on a page (for example, using bootstrapApplication calls). In this case, ensure that those applications have different APP_ID value setup. For example:

bootstrapApplication(ComponentA, {
  providers: [
    { provide: APP_ID, useValue: 'app-a' },
    // ... other providers ...
  ]
});

bootstrapApplication(ComponentB, {
  providers: [
    { provide: APP_ID, useValue: 'app-b' },
    // ... other providers ...
  ]
});

By default, when there is only one application bootstrapped, you don't need to provide the APP_ID token (the ng will be used as an app ID).

You are visitor 01402520 — 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.