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

Commit 61ad427

Browse files
Foxandxsswardbell
authored andcommitted
docs(toh): add missing snippets
closes #1649
1 parent fd46bf4 commit 61ad427

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

public/docs/_examples/toh-6/ts/app/hero-detail.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// #docplaster
2-
// #docregion
2+
// #docregion, variables-imports
33
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
4+
5+
// #enddocregion variables-imports
46
import { RouteParams } from '@angular/router-deprecated';
57

68
import { Hero } from './hero';
@@ -11,11 +13,13 @@ import { HeroService } from './hero.service';
1113
templateUrl: 'app/hero-detail.component.html',
1214
styleUrls: ['app/hero-detail.component.css']
1315
})
16+
// #docregion variables-imports
1417
export class HeroDetailComponent implements OnInit {
1518
@Input() hero: Hero;
1619
@Output() close = new EventEmitter();
1720
error: any;
1821
navigated = false; // true if navigated here
22+
// #enddocregion variables-imports
1923

2024
constructor(
2125
private heroService: HeroService,

public/docs/ts/latest/tutorial/toh-pt6.jade

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ code-example(language="bash").
217217
Loading heroes using `Http` required no changes outside of `HeroService`, but we added a few new features as well.
218218
In the following section we will update our components to use our new methods to add, edit and delete heroes.
219219

220+
Before we can add those methods, we need to initialize some variables with their respective imports.
221+
222+
+makeExample('toh-6/ts/app/hero-detail.component.ts', 'variables-imports', 'app/hero-detail.component.ts')(format=".")
223+
224+
:marked
220225
### Add/Edit in the *HeroDetailComponent*
221226

222227
We already have `HeroDetailComponent` for viewing details about a specific hero.

0 commit comments

Comments
 (0)