diff --git a/aio-ja/content/tutorial/toh-pt2.md b/aio-ja/content/tutorial/toh-pt2.md index c8c54bd590..b67e4e532f 100644 --- a/aio-ja/content/tutorial/toh-pt2.md +++ b/aio-ja/content/tutorial/toh-pt2.md @@ -1,207 +1,197 @@ -# Display a Heroes List +# ヒーローのリストを表示する -In this page, you'll expand the Tour of Heroes app to display a list of heroes, and -allow users to select a hero and display the hero's details. +このページでは「Tour of Heroes」アプリを拡張してヒーローのリストを表示し、ユーザーがヒーローを選択してヒーローの詳細を表示できるようにします。 -## Create mock heroes +## ヒーローのモックを作成する -You'll need some heroes to display. +まずは、表示するためのいくつかのヒーローが必要でしょう。 -Eventually you'll get them from a remote data server. -For now, you'll create some _mock heroes_ and pretend they came from the server. +最終的には、リモートのデータサーバーからそれらのヒーローを取得します。 +ひとまず、サーバーからデータが返ってきたと仮定して _ヒーローのモック_ を作成しましょう。 -Create a file called `mock-heroes.ts` in the `src/app/` folder. -Define a `HEROES` constant as an array of ten heroes and export it. -The file should look like this. +`mock-heroes.ts` と呼ばれるファイルを `src/app/` フォルダに作成してください。 +`HEROES` 定数を10人のヒーローの配列として定義し、エクスポートしてください。 +ファイルは次のようになるでしょう。 -## Displaying heroes +## ヒーローを表示する -You're about to display the list of heroes at the top of the `HeroesComponent`. +あなたは `HeroesComponent` の1番上にヒーローのリストを表示しようとしています。 -Open the `HeroesComponent` class file and import the mock `HEROES`. +`HeroesComponent` クラスのファイルを開いて `HEROES` モックをインポートしてください。 -Add a `heroes` property to the class that exposes these heroes for binding. +これらのヒーローをバインディングするために、ヒーローを公開するクラスに `heroes` プロパティを追加してください。 -### List heroes with _*ngFor_ +### _*ngFor_ でヒーローを一覧表示する -Open the `HeroesComponent` template file and make the following changes: +`HeroesComponent` テンプレートを開き、次のように変更してください: -* Add an `

` at the top, -* Below it add an HTML unordered list (`