This repository was archived by the owner on Dec 4, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 876
docs(toh-5): TS/Dart review, and Dart resync #2115
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,45 +1,51 @@ | ||
// #docplaster | ||
// #docregion | ||
import 'package:angular2/core.dart'; | ||
// #docregion import-router | ||
import 'package:angular2/router.dart'; | ||
// #enddocregion import-router | ||
|
||
import 'package:angular2_tour_of_heroes/heroes_component.dart'; | ||
import 'package:angular2_tour_of_heroes/hero_service.dart'; | ||
import 'package:angular2_tour_of_heroes/dashboard_component.dart'; | ||
// #docregion hero-detail-import | ||
import 'package:angular2_tour_of_heroes/hero_detail_component.dart'; | ||
// #enddocregion hero-detail-import | ||
import 'dashboard_component.dart'; | ||
import 'hero_detail_component.dart'; | ||
import 'hero_service.dart'; | ||
import 'heroes_component.dart'; | ||
|
||
@Component( | ||
selector: 'my-app', | ||
// #docregion template | ||
// #docregion template, template-v3 | ||
template: ''' | ||
<h1>{{title}}</h1> | ||
<nav> | ||
<a [routerLink]="['Dashboard']">Dashboard</a> | ||
<a [routerLink]="['Heroes']">Heroes</a> | ||
</nav> | ||
<router-outlet></router-outlet>''', | ||
// #enddocregion template | ||
// #docregion style-urls | ||
// #enddocregion template, template-v3 | ||
// #docregion styleUrls | ||
styleUrls: const ['app_component.css'], | ||
// #enddocregion style-urls | ||
// #enddocregion styleUrls | ||
// #docregion directives-and-providers | ||
directives: const [ROUTER_DIRECTIVES], | ||
providers: const [HeroService, ROUTER_PROVIDERS]) | ||
// #enddocregion directives-and-providers | ||
// #docregion heroes | ||
@RouteConfig(const [ | ||
// #docregion dashboard-route | ||
// #enddocregion heroes | ||
// #docregion dashboard | ||
const Route( | ||
path: '/dashboard', | ||
name: 'Dashboard', | ||
component: DashboardComponent, | ||
useAsDefault: true), | ||
// #enddocregion dashboard-route | ||
// #docregion hero-detail-route | ||
// #enddocregion dashboard | ||
// #docregion hero-detail | ||
const Route( | ||
path: '/detail/:id', name: 'HeroDetail', component: HeroDetailComponent), | ||
// #enddocregion hero-detail-route | ||
// #enddocregion hero-detail | ||
// #docregion heroes | ||
const Route(path: '/heroes', name: 'Heroes', component: HeroesComponent) | ||
]) | ||
// #enddocregion heroes | ||
class AppComponent { | ||
String title = 'Tour of Heroes'; | ||
} |
This file contains hidden or 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,25 +1,40 @@ | ||
// #docplaster | ||
// #docregion | ||
// #docregion , v2 | ||
import 'package:angular2/core.dart'; | ||
// #enddocregion | ||
import 'package:angular2/router.dart'; // for testing only | ||
// #enddocregion , | ||
// #docregion v2 | ||
import 'package:angular2/router.dart'; | ||
// #docregion | ||
|
||
import 'hero_service.dart'; | ||
import 'heroes_component.dart'; | ||
|
||
// #enddocregion v2 | ||
@Component( | ||
selector: 'my-app', | ||
template: ''' | ||
<h1>{{title}}</h1> | ||
<my-heroes></my-heroes>''', | ||
directives: const [HeroesComponent], | ||
providers: const [ | ||
// #enddocregion | ||
ROUTER_PROVIDERS, | ||
// #docregion | ||
HeroService | ||
]) | ||
providers: const [HeroService]) | ||
// #enddocregion , | ||
class Bogus {} | ||
|
||
// #docregion v2 | ||
@Component( | ||
selector: 'my-app', | ||
// #docregion template-v2 | ||
template: ''' | ||
<h1>{{title}}</h1> | ||
<a [routerLink]="['Heroes']">Heroes</a> | ||
<router-outlet></router-outlet>''', | ||
// #enddocregion template-v2 | ||
directives: const [ROUTER_DIRECTIVES], | ||
providers: const [HeroService, ROUTER_PROVIDERS]) | ||
@RouteConfig(const [ | ||
const Route(path: '/heroes', name: 'Heroes', component: HeroesComponent) | ||
]) | ||
// #docregion , | ||
class AppComponent { | ||
String title = 'Tour of Heroes'; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered about having two
@Component
annotations for a single class. Sure enough, when I try topub serve
orpub build
this, I get a build error:Does the serve/build work without errors for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing that now.