Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(router): attribute notation for string paths #12205

Merged
merged 1 commit into from Oct 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions modules/@angular/router/src/directives/router_link_active.ts
Expand Up @@ -20,7 +20,7 @@ import {RouterLink, RouterLinkWithHref} from './router_link';
* @howToUse
*
* ```
* <a [routerLink]='/user/bob' routerLinkActive='active-link'>Bob</a>
* <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a>
* ```
*
* @description
Expand All @@ -31,7 +31,7 @@ import {RouterLink, RouterLinkWithHref} from './router_link';
* Consider the following example:
*
* ```
* <a [routerLink]="/user/bob" routerLinkActive="active-link">Bob</a>
* <a routerLink="/user/bob" routerLinkActive="active-link">Bob</a>
* ```
*
* When the url is either '/user' or '/user/bob', the active-link class will
Expand All @@ -40,24 +40,24 @@ import {RouterLink, RouterLinkWithHref} from './router_link';
* You can set more than one class, as follows:
*
* ```
* <a [routerLink]="/user/bob" routerLinkActive="class1 class2">Bob</a>
* <a [routerLink]="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a>
* <a routerLink="/user/bob" routerLinkActive="class1 class2">Bob</a>
* <a routerLink="/user/bob" [routerLinkActive]="['class1', 'class2']">Bob</a>
* ```
*
* You can configure RouterLinkActive by passing `exact: true`. This will add the classes
* only when the url matches the link exactly.
*
* ```
* <a [routerLink]="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact:
* <a routerLink="/user/bob" routerLinkActive="active-link" [routerLinkActiveOptions]="{exact:
* true}">Bob</a>
* ```
*
* Finally, you can apply the RouterLinkActive directive to an ancestor of a RouterLink.
*
* ```
* <div routerLinkActive="active-link" [routerLinkActiveOptions]="{exact: true}">
* <a [routerLink]="/user/jim">Jim</a>
* <a [routerLink]="/user/bob">Bob</a>
* <a routerLink="/user/jim">Jim</a>
* <a routerLink="/user/bob">Bob</a>
* </div>
* ```
*
Expand Down