diff --git a/public/docs/_examples/toh-3/dart/lib/app_component.dart b/public/docs/_examples/toh-3/dart/lib/app_component.dart index 774f8e68f6..d2ed99d75b 100644 --- a/public/docs/_examples/toh-3/dart/lib/app_component.dart +++ b/public/docs/_examples/toh-3/dart/lib/app_component.dart @@ -10,7 +10,7 @@ import 'hero_detail_component.dart'; @Component( selector: 'my-app', -// #docregion hero-detail-template + // #docregion hero-detail-template template: '''

{{title}}

My Heroes

@@ -23,8 +23,9 @@ import 'hero_detail_component.dart'; ''', -// #enddocregion hero-detail-template - styles: const [''' + // #enddocregion hero-detail-template + styles: const [ + ''' .selected { background-color: #CFD8DC !important; color: white; @@ -73,17 +74,16 @@ import 'hero_detail_component.dart'; } ''' ], -// #docregion directives - directives: const [ - HeroDetailComponent - ]) -// #enddocregion directives + // #docregion directives + directives: const [HeroDetailComponent] + // #enddocregion directives + ) class AppComponent { final String title = 'Tour of Heroes'; final List heroes = mockHeroes; Hero selectedHero; - onSelect(Hero hero) { + void onSelect(Hero hero) { selectedHero = hero; } } diff --git a/public/docs/_examples/toh-3/dart/lib/hero.dart b/public/docs/_examples/toh-3/dart/lib/hero.dart index 71eb336b9c..ea51fc9bc2 100644 --- a/public/docs/_examples/toh-3/dart/lib/hero.dart +++ b/public/docs/_examples/toh-3/dart/lib/hero.dart @@ -5,4 +5,3 @@ class Hero { Hero(this.id, this.name); } -// #enddocregion diff --git a/public/docs/_examples/toh-3/dart/lib/hero_detail_component.dart b/public/docs/_examples/toh-3/dart/lib/hero_detail_component.dart index e8481c5261..9b85d21965 100644 --- a/public/docs/_examples/toh-3/dart/lib/hero_detail_component.dart +++ b/public/docs/_examples/toh-3/dart/lib/hero_detail_component.dart @@ -11,29 +11,26 @@ import 'hero.dart'; // #docregion v1 @Component( selector: 'my-hero-detail', -// #enddocregion v1 + // #enddocregion v1 // #docregion template template: ''' -
-

{{hero.name}} details!

-
{{hero.id}}
-
- - -
-
- ''' +
+

{{hero.name}} details!

+
{{hero.id}}
+
+ + +
+
''' // #enddocregion template -// #docregion v1 + // #docregion v1 ) class HeroDetailComponent { -// #enddocregion v1 -// #docregion inputs + // #enddocregion v1 + // #docregion inputs @Input() -// #docregion hero + // #docregion hero Hero hero; -// #enddocregion hero -// #enddocregion inputs -// #docregion v1 + // #enddocregion hero, inputs + // #docregion v1 } -// #enddocregion v1 diff --git a/public/docs/dart/latest/glossary.jade b/public/docs/dart/latest/glossary.jade index ec8bdf04f3..4dad0d501e 100644 --- a/public/docs/dart/latest/glossary.jade +++ b/public/docs/dart/latest/glossary.jade @@ -12,7 +12,19 @@ include _util-fns !=partial('../../ts/latest/_fragments/glossary-f-l') !=partial('../../ts/latest/_fragments/glossary-m1') //!=partial('../../ts/latest/_fragments/glossary-m2') not needed in dart -!=partial('../../ts/latest/_fragments/glossary-n-s') +!=partial('../../ts/latest/_fragments/glossary-n-s-1') + +:marked + ## snake_case +.l-sub-section + :marked + The practice of writing compound words or phrases such that each word is separated by an underscore (`_`). + + Library and file names are often spelled in snake_case. Examples include: `angular2_tour_of_heroes` and `app_component.dart`. + + This form is also known as **underscore case**. + +!=partial('../../ts/latest/_fragments/glossary-n-s-2') !=partial('../../ts/latest/_fragments/glossary-t1') //!=partial('../../ts/latest/_fragments/glossary-t2') notneeded in dart !=partial('../../ts/latest/_fragments/glossary-u-z') diff --git a/public/docs/dart/latest/tutorial/toh-pt1.jade b/public/docs/dart/latest/tutorial/toh-pt1.jade index a600cea7d6..6c86b4d6ae 100644 --- a/public/docs/dart/latest/tutorial/toh-pt1.jade +++ b/public/docs/dart/latest/tutorial/toh-pt1.jade @@ -26,10 +26,9 @@ include ../_util-fns .children .file index.html .file main.dart + .file styles.css .file pubspec.yaml -// Add .file styles.css - .p   .callout.is-helpful diff --git a/public/docs/dart/latest/tutorial/toh-pt2.jade b/public/docs/dart/latest/tutorial/toh-pt2.jade index 6127079ab1..5fe537ddbc 100644 --- a/public/docs/dart/latest/tutorial/toh-pt2.jade +++ b/public/docs/dart/latest/tutorial/toh-pt2.jade @@ -29,6 +29,7 @@ p Run the #[+liveExampleLink2('', 'toh-2')] for this part. .children .file index.html .file main.dart + .file styles.css .file pubspec.yaml :marked ### Keep the app compiling and running diff --git a/public/docs/dart/latest/tutorial/toh-pt3.jade b/public/docs/dart/latest/tutorial/toh-pt3.jade index 3c4a961b77..25653aff27 100644 --- a/public/docs/dart/latest/tutorial/toh-pt3.jade +++ b/public/docs/dart/latest/tutorial/toh-pt3.jade @@ -21,12 +21,13 @@ p Run the #[+liveExampleLink2('', 'toh-3')] for this part. .children .file index.html .file main.dart + .file styles.css .file pubspec.yaml :marked ### Keep the app compiling and running We want to start the Dart compiler, have it watch for changes, and start our server. We'll do this by typing -code-example(format="." language="bash"). +code-example(language="bash"). pub serve :marked @@ -50,7 +51,7 @@ code-example(format="." language="bash"). ### Separating the Hero Detail Component Add a new file named `hero_detail_component.dart` to the `lib` folder and create `HeroDetailComponent` as follows. -+makeExample('toh-3/dart/lib/hero_detail_component.dart', 'v1', 'hero_detail_component.dart (initial version)')(format=".") ++makeExample('toh-3/dart/lib/hero_detail_component.dart', 'v1', 'lib/hero_detail_component.dart (initial version)')(format=".") .l-sub-section :marked ### Naming conventions @@ -61,7 +62,8 @@ code-example(format="." language="bash"). All of our component names end in "Component". All of our component file names end in "_component". - We spell our filenames in lower underscore case (AKA "snake_case") so we don't worry about + We spell our filenames in lower **underscore case** + (AKA **[snake_case](../guide/glossary.html#!#snake_case)**) so we don't worry about case sensitivity on the server or in source control.