-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slight tidy of example html, needs designing.
- Loading branch information
1 parent
7857031
commit f362971
Showing
4 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,37 @@ | ||
import {Component} from 'angular2/core'; | ||
import {HelloWorld} from '../src/hello-world/hello-world'; | ||
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router'; | ||
|
||
import {HelloWorldExamples} from './hello-world'; | ||
|
||
@Component({ | ||
selector: 'app', | ||
template: ` | ||
<h1>Examples</h1> | ||
<hello-world><hello-world> | ||
<div class="flexbox-container"> | ||
<div class="flexbox-container__column"> | ||
<ul> | ||
<li><a [routerLink]="['HelloWorld']">Hello World</a></li> | ||
<li><a href="./coverage">Test Coverage Report</a></li> | ||
</ul> | ||
</div> | ||
<div class="flexbox-container__column"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div> | ||
`, | ||
directives: [HelloWorld] | ||
styles: [` | ||
.flexbox-container { | ||
display: flex; | ||
}`, | ||
` | ||
.flexbox-container__column { | ||
padding: 10px; | ||
} | ||
`], | ||
directives: [ROUTER_DIRECTIVES] | ||
}) | ||
@RouteConfig([ | ||
{ path: '/helloworld', name: 'HelloWorld', component: HelloWorldExamples } | ||
]) | ||
|
||
export class App { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import {bootstrap} from 'angular2/platform/browser'; | ||
import {App} from './app'; | ||
import {provide} from 'angular2/core'; | ||
import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy} from 'angular2/router'; | ||
import {App} from './app'; | ||
|
||
bootstrap(App); | ||
bootstrap(App, [ | ||
ROUTER_PROVIDERS, | ||
provide(LocationStrategy, { useClass: HashLocationStrategy }) | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {Component} from 'angular2/core'; | ||
import {HelloWorld} from '../src/hello-world/hello-world'; | ||
|
||
@Component({ | ||
selector: 'hello-world-examples', | ||
template: ` | ||
<h1>Hello World</h1> | ||
<hello-world><hello-world> | ||
`, | ||
directives: [HelloWorld] | ||
}) | ||
export class HelloWorldExamples { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters