RouterLink

Stable Directive What it does Lets you link to specific parts of your app. How to use Consider the following route configuration: [{ path: 'user/:name', component: UserCmp }] When linking to this user/:name route, you can write: <a routerLink='/user/bob'>link to user component</a> Class Overview class RouterLink { constructor(router: Router, route: ActivatedRoute, locationStrategy: LocationStrategy) queryParams : {[k: string]: any} fragment : string preserveQu

disableDebugTools()

Experimental Function Class Export export disableDebugTools() : void Disables Angular 2 tools. exported from @angular/platform-browser/index defined in @angular/platform-browser/src/browser/tools/tools.ts

Component-relative Paths

Use relative URLs for component templates and styles. Write Component-Relative URLs to component templates and style files Our components often refer to external template and style files. We identify those files with a URL in the templateUrl and styleUrls properties of the @Component metadata as seen here: @Component({ selector: 'absolute-path', templateUrl: 'app/some.component.html', styleUrls: ['app/some.component.css'] }) By default, we must specify the full path back to the applicat

NgForm

Stable Directive What it does Creates a top-level FormGroup instance and binds it to a form to track aggregate form value and validation status. How to use As soon as you import the FormsModule, this directive becomes active by default on all <form> tags. You don't need to add a special selector. You can export the directive into a local template variable using ngForm as the key (ex: #myForm="ngForm"). This is optional, but useful. Many properties from the underlying FormGroup instan

TrackByFn

Stable Interface Interface Overview interface TrackByFn { } Interface Description An optional function passed into NgFor that defines how to track items in an iterable (e.g. by index or id) exported from @angular/core/index, defined in @angular/core/src/change_detection/differs/iterable_differs.ts

setTestabilityGetter()

Experimental Function Class Export export setTestabilityGetter(getter: GetTestability) : void Set the GetTestability implementation used by the Angular testing framework. exported from @angular/core/index defined in @angular/core/src/testability/testability.ts

1. Overview

This is a practical guide to Angular for experienced programmers who are building client applications in HTML and TypeScript. Organization The documentation is divided into major thematic sections, each a collection of pages devoted to that theme. QuickStart The foundation for every page and sample in this documentation. Tutorial A step-by-step, immersive approach to learning Angular that introduces the major features of Angular in an application context. Basics The essential ingredients

AnimationStateDeclarationMetadata

Experimental Class Class Overview class AnimationStateDeclarationMetadata { constructor(stateNameExpr: string, styles: AnimationStyleMetadata) stateNameExpr : string styles : AnimationStyleMetadata } Class Description Metadata representing the entry of animations. Instances of this class are provided via the animation DSL when the state animation function is called. Constructor constructor(stateNameExpr: string, styles: AnimationStyleMetadata) Class Details stateNameExpr :

6. Routing

We add the Angular Component Router and learn to navigate among the views Routing Around the App We received new requirements for our Tour of Heroes application: Add a Dashboard view. Navigate between the Heroes and Dashboard views. Clicking on a hero in either view navigates to a detail view of the selected hero. Clicking a deep link in an email opens the detail view for a particular hero. When we’re done, users will be able to navigate the app like this: We'll add Angular’s Component Rout

flushMicrotasks()

Experimental Function Class Export export flushMicrotasks() : void Flush any pending microtasks. exported from @angular/core/testing/index defined in @angular/core/testing/fake_async.ts