CanDeactivate

Stable Interface What it does Indicates that a class can implement to be a guard deciding if a route can be deactivated. How to use class UserToken {} class Permissions { canDeactivate(user: UserToken, id: string): boolean { return true; } } @Injectable() class CanDeactivateTeam implements CanDeactivate<TeamComponent> { constructor(private permissions: Permissions, private currentUser: UserToken) {} canDeactivate( component: TeamComponent, route: ActivatedRouteS

LOCALE_ID

Experimental Const Variable Export export LOCALE_ID exported from @angular/core/index defined in @angular/core/src/i18n/tokens.ts

Query

Stable Class Class Overview class Query { descendants : boolean first : boolean read : any isViewQuery : boolean selector : any } Class Description Base class for query metadata. See ContentChildren, ContentChild, ViewChildren, ViewChild for more information. Class Details descendants : boolean first : boolean read : any isViewQuery : boolean selector : any exported from @angular/core/index, defined in @angular/core/src/metadata/di.ts

NgLocalization

Experimental Class Class Overview class NgLocalization { getPluralCategory(value: any) : string } Class Description Class Details getPluralCategory(value: any) : string exported from @angular/common/index, defined in @angular/common/src/localization.ts

I18nSelectPipe

Experimental Pipe What it does Generic selector that displays the string that matches the current value. How to use expression | i18nSelect:mapping NgModuleCommonModule Description Where: mapping: is an object that indicates the text that should be displayed for different values of the provided expression. Example @Component( {selector: 'i18n-select-pipe', template: `<div>{{gender | i18nSelect: inviteMap}} </div>`}) export class I18nSelectPipeComponent { gender: str

CanActivateChild

Stable Interface What it does Indicates that a class can implement to be a guard deciding if a child route can be activated. How to use class UserToken {} class Permissions { canActivate(user: UserToken, id: string): boolean { return true; } } @Injectable() class CanActivateTeam implements CanActivate { constructor(private permissions: Permissions, private currentUser: UserToken) {} canActivateChild( route: ActivatedRouteSnapshot, state: RouterStateSnapshot ): Obser

ComponentFixture

Stable Class Class Overview class ComponentFixture { constructor(componentRef: ComponentRef<T>, ngZone: NgZone, _autoDetect: boolean) debugElement : DebugElement componentInstance : T nativeElement : any elementRef : ElementRef changeDetectorRef : ChangeDetectorRef componentRef : ComponentRef<T> ngZone : NgZone detectChanges(checkNoChanges?: boolean) : void checkNoChanges() : void autoDetectChanges(autoDetect?: boolean) isStable() : boolean whenSta

RoutesRecognized

Stable Class What it does Represents an event triggered when routes are recognized. Class Overview class RoutesRecognized { constructor(id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot) id : number url : string urlAfterRedirects : string state : RouterStateSnapshot toString() : string } Class Description Constructor constructor(id: number, url: string, urlAfterRedirects: string, state: RouterStateSnapshot) Class Details id : number url :

SystemJsNgModuleLoader

Experimental Class Class Overview class SystemJsNgModuleLoader { constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig) load(path: string) : Promise<NgModuleFactory<any>> } Class Description NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory Annotations @Injectable() Constructor constructor(_compiler: Compiler, config?: SystemJsNgModuleLoaderConfig) Class Details load(path: string) : Promise<NgModuleFactory<any>> expor

Upgrading from 1.x

Angular 1 applications can be incrementally upgraded to Angular 2. This guide is still in the process of being updated to RC5 and it's samples may not work correctly. Having an existing Angular 1 application doesn't mean that we can't begin enjoying everything Angular 2 has to offer. That's because Angular 2 comes with built-in tools for migrating Angular 1 projects over to the Angular 2 platform. Some applications will be easier to upgrade than others, and there are ways in which we can make