diff --git a/aio/content/examples/toh-pt1/app/app.component.1.ts b/aio/content/examples/toh-pt1/app/app.component.1.ts new file mode 100644 index 0000000000..cebe8e6759 --- /dev/null +++ b/aio/content/examples/toh-pt1/app/app.component.1.ts @@ -0,0 +1,44 @@ +import { Component } from '@angular/core'; + +let t = { +// #docregion show-hero +template: `

{{title}}

{{hero}} details!

` +// #enddocregion show-hero +}; + +t = { +// #docregion show-hero-2 +template: `

{{title}}

{{hero.name}} details!

` +// #enddocregion show-hero-2 +}; + +t = { +// #docregion multi-line-strings +template: ` +

{{title}}

+

{{hero.name}} details!

+
{{hero.id}}
+
{{hero.name}}
+ ` +// #enddocregion multi-line-strings +}; + + +/* +// #docregion name-input +
+ + +
+// #enddocregion name-input +*/ + +///////////////// + +@Component(t) +// #docregion app-component-1 +export class AppComponent { + title = 'Tour of Heroes'; + hero = 'Windstorm'; +} +// #enddocregion app-component-1 diff --git a/aio/content/examples/toh-pt3/app/app.component.1.html b/aio/content/examples/toh-pt3/app/app.component.1.html new file mode 100644 index 0000000000..8b6c3b0d82 --- /dev/null +++ b/aio/content/examples/toh-pt3/app/app.component.1.html @@ -0,0 +1,12 @@ +

{{title}}

+

My Heroes

+ + + + diff --git a/aio/content/examples/toh-pt3/app/hero-detail.component.1.ts b/aio/content/examples/toh-pt3/app/hero-detail.component.1.ts new file mode 100644 index 0000000000..fec477fbd7 --- /dev/null +++ b/aio/content/examples/toh-pt3/app/hero-detail.component.1.ts @@ -0,0 +1,35 @@ +// #docplaster +// #docregion v1 +import { Component } from '@angular/core'; + +// #enddocregion v1 +// #docregion hero-import +import { Hero } from './hero'; +// #enddocregion hero-import + +// #docregion v1 +@Component({ + selector: 'hero-detail', +// #enddocregion v1 + // #docregion template + template: ` +
+

{{hero.name}} details!

+
{{hero.id}}
+
+ + +
+
+ ` + // #enddocregion template +// #docregion v1 +}) +export class HeroDetailComponent { +// #enddocregion v1 +// #docregion hero + hero: Hero; +// #enddocregion hero +// #docregion v1 +} +// #enddocregion v1