Skip to content

Commit

Permalink
Step 2: Static Template
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB committed Dec 14, 2016
1 parent ff7d501 commit bc28498
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
7 changes: 7 additions & 0 deletions manuals/templates/step2.md
@@ -0,0 +1,7 @@
Let's create a purely static HTML page and then examine how we can turn this HTML code into a template that Angular will use to dynamically display the same result with any set of data.

Add this template HTML to `app.html`:

{{{diff_step 2.1}}}

Now, let's go to the [next step](/tutorials/angular2/dynamic-template) and learn how to dynamically generate the same list using Angular 2.
41 changes: 41 additions & 0 deletions manuals/views/step2.md
@@ -0,0 +1,41 @@
[{]: <region> (header)
# Step 2: Static Template
[}]: #
[{]: <region> (body)
Let's create a purely static HTML page and then examine how we can turn this HTML code into a template that Angular will use to dynamically display the same result with any set of data.

Add this template HTML to `app.html`:

[{]: <helper> (diff_step 2.1)
#### Step 2.1: Add static HTML to the main component view

##### Changed client/imports/app/app.component.html
```diff
@@ -1 +1,14 @@
-┊ 1┊ ┊Hello World!🚫↵
+┊ ┊ 1┊<ul>
+┊ ┊ 2┊ <li>
+┊ ┊ 3┊ <span>Dubstep-Free Zone</span>
+┊ ┊ 4┊ <p>
+┊ ┊ 5┊ Can we please just for an evening not listen to dubstep.
+┊ ┊ 6┊ </p>
+┊ ┊ 7┊ </li>
+┊ ┊ 8┊ <li>
+┊ ┊ 9┊ <span>All dubstep all the time</span>
+┊ ┊10┊ <p>
+┊ ┊11┊ Get it on!
+┊ ┊12┊ </p>
+┊ ┊13┊ </li>
+┊ ┊14┊</ul>🚫↵
```
[}]: #

Now, let's go to the [next step](/tutorials/angular2/dynamic-template) and learn how to dynamically generate the same list using Angular 2.

[}]: #
[{]: <region> (footer)
[{]: <helper> (nav_step)
| [< Previous Step](step1.md) | [Next Step >](step3.md) |
|:--------------------------------|--------------------------------:|
[}]: #
[}]: #

0 comments on commit bc28498

Please sign in to comment.