Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 45459bf

Browse files
committed
docs(cb-a11y): Building examples - Form controls
1 parent 7d77385 commit 45459bf

File tree

5 files changed

+31
-3
lines changed

5 files changed

+31
-3
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<nav role="navigation">
2+
<ol>
3+
<li>
4+
<a href="" [routerLink]="['FormControls']"><h2>Accessible form control labels</h2></a>
5+
</li>
6+
</ol>
7+
</nav>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {Component} from "angular2/core";
2+
import {ROUTER_DIRECTIVES} from "angular2/router";
3+
4+
@Component({
5+
selector: 'a11y-index',
6+
templateUrl: './app/a11y-index.component.html',
7+
directives: [ROUTER_DIRECTIVES]
8+
})
9+
export class A11yIndex{
10+
11+
}

public/docs/_examples/cb-a11y/ts/app/app.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
<h1 id="top">Angular 2 A11y Cookbook</h1>
33
</header>
44
<main role="main" class="container">
5-
<a11y-form-controls></a11y-form-controls>
5+
<router-outlet></router-outlet>
6+
<!--<a11y-index></a11y-index>-->
7+
<!--<a11y-form-controls></a11y-form-controls>-->
68
</main>
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import {Component} from 'angular2/core';
22
import {A11yFormControls} from "./a11y-form-controls.component";
33
import {A11yHelper} from "./services/a11y-helper.service";
4+
import {ROUTER_DIRECTIVES, RouteConfig, ROUTER_PROVIDERS} from "angular2/router";
5+
import {A11yIndex} from "./a11y-index.component";
46

57
@Component({
68
selector: 'app',
79
templateUrl: 'app/app.component.html',
8-
directives:[A11yFormControls],
9-
providers: [A11yHelper]
10+
directives:[ROUTER_DIRECTIVES, A11yFormControls, A11yIndex],
11+
providers: [ROUTER_PROVIDERS, A11yHelper]
1012
})
13+
@RouteConfig([
14+
{path:'/', name: 'Index', component: A11yIndex},
15+
{path:'/formcontrols', name: 'FormControls', component: A11yFormControls}
16+
])
1117
export class AppComponent {
1218

1319
}

public/docs/_examples/cb-a11y/ts/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
<base href="/">
45
<title>A11y demonstration</title>
56

67
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -19,6 +20,7 @@
1920
<script src="node_modules/systemjs/dist/system.src.js"></script>
2021
<script src="node_modules/rxjs/bundles/Rx.js"></script>
2122
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
23+
<script src="node_modules/angular2/bundles/router.dev.js"></script>
2224
<script>
2325
System.config({
2426
packages: {

0 commit comments

Comments
 (0)