RouterModule

Stable Class What it does Adds router directives and providers. How to use RouterModule can be imported multiple times: once per lazily-loaded bundle. Since the router deals with a global shared resource--location, we cannot have more than one router service active. That is why there are two ways to create the module: RouterModule.forRoot and RouterModule.forChild. forRoot creates a module that contains all the directives, the given routes, and the router service itself. forChild creates

AfterContentChecked

Stable Class What it does Lifecycle hook that is called after every check of a directive's content. How to use . @Component({selector: 'my-cmp', template: `...`}) class MyComponent implements AfterContentChecked { ngAfterContentChecked() { // ... } } Class Overview class AfterContentChecked { ngAfterContentChecked() : void } Class Description See Lifecycle Hooks Guide. Class Details ngAfterContentChecked() : void exported from @angular/core/index, defined in @angular/core

getPlatform()

Experimental Function Class Export export getPlatform() : PlatformRef Returns the current platform. exported from @angular/core/index defined in @angular/core/src/application_ref.ts

ComponentFixtureNoNgZone

Experimental Const Variable Export export ComponentFixtureNoNgZone exported from @angular/core/testing/index defined in @angular/core/testing/test_bed.ts

asNativeElements()

Experimental Function Class Export export asNativeElements(debugEls: DebugElement[]) : any exported from @angular/core/index defined in @angular/core/src/debug/debug_node.ts

TestabilityRegistry

Experimental Class Class Overview class TestabilityRegistry { constructor() registerApplication(token: any, testability: Testability) getTestability(elem: any) : Testability getAllTestabilities() : Testability[] getAllRootElements() : any[] findTestabilityInTree(elem: Node, findInAncestors?: boolean) : Testability } Class Description A global registry of Testability instances for specific elements. Annotations @Injectable() Constructor constructor() Class Details re

TestModuleMetadata

Experimental Type-alias Interface Overview interface TestModuleMetadata { } Interface Description exported from @angular/core/testing/index, defined in @angular/core/testing/test_bed.ts

Hierarchical Injectors

Angular's hierarchical dependency injection system supports nested injectors in parallel with the component tree. We learned the basics of Angular Dependency injection in the Dependency Injection chapter. Angular has a Hierarchical Dependency Injection system. There is actually a tree of injectors that parallel an application's component tree. We can reconfigure the injectors at any level of that component tree with interesting and useful results. In this chapter we explore these points and wri

ViewRef

Stable Class Class Overview class ViewRef { destroyed : boolean onDestroy(callback: Function) : any } Class Description Class Details destroyed : boolean onDestroy(callback: Function) : any exported from @angular/core/index, defined in @angular/core/src/linker/view_ref.ts

Routes

Stable Type-alias What it does Represents router configuration. Interface Overview interface Routes { } Interface Description Routes is an array of route configurations. Each one has the following properties: path is a string that uses the route matcher DSL. pathMatch is a string that specifies the matching strategy. component is a component type. redirectTo is the url fragment which will replace the current matched segment. outlet is the name of the outlet the component should be p