Skip to content

Commit 80e3b72

Browse files
committed
Simplifying the constructor explanation
1 parent 73962e7 commit 80e3b72

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

index.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,7 @@ <h4 class="exercise-start">
640640
}
641641
}
642642
</code></pre>
643-
<p>Instead of storing data on the <code>AppComponent</code> directly, you’re now using the <code>User</code> model object, which is reusable outside of this page and even outside of this application. You instantiate a new instance of the <code>User</code> class in a new <code>constructor</code> function, that Angular 2 will invoke when it bootstraps your application.</p>
644-
<blockquote>
645-
<p><strong>NOTE</strong>: Remember that in <code>main.ts</code> you’re calling <code>nativeScriptBootstrap(AppComponent)</code>. Under the hood, Angular 2 will instantiate an instance of <code>AppComponent</code> during the bootstrapping process, which will cause your <code>AppComponent</code> constructor function to run.</p>
646-
</blockquote>
643+
<p>Instead of storing data on the <code>AppComponent</code> directly, you’re now using the <code>User</code> model object, which is reusable outside of this page and even outside of this application. You instantiate an instance of the <code>User</code> class in a new <code>constructor</code> function, which Angular 2 invokes when it bootstraps your application.</p>
647644
<p>Your final step is to use this new model object in your template. To do that, replace the two existing <code>&lt;TextField&gt;</code>s with the code shown below, which updates the <code>[(ngModel)]</code> bindings to point at the new <code>User</code> object:</p>
648645
<pre><code class="lang-XML">&lt;TextField hint=&quot;Email Address&quot; keyboardType=&quot;email&quot; [(ngModel)]=&quot;user.email&quot;
649646
autocorrect=&quot;false&quot; autocapitalizationType=&quot;none&quot;&gt;&lt;/TextField&gt;

src/chapters/chapter3.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ export class AppComponent {
153153
}
154154
```
155155

156-
Instead of storing data on the `AppComponent` directly, you’re now using the `User` model object, which is reusable outside of this page and even outside of this application. You instantiate a new instance of the `User` class in a new `constructor` function, that Angular 2 will invoke when it bootstraps your application.
157-
158-
> **NOTE**: Remember that in `main.ts` you’re calling `nativeScriptBootstrap(AppComponent)`. Under the hood, Angular 2 will instantiate an instance of `AppComponent` during the bootstrapping process, which will cause your `AppComponent` constructor function to run.
156+
Instead of storing data on the `AppComponent` directly, you’re now using the `User` model object, which is reusable outside of this page and even outside of this application. You instantiate an instance of the `User` class in a new `constructor` function, which Angular 2 invokes when it bootstraps your application.
159157

160158
Your final step is to use this new model object in your template. To do that, replace the two existing `<TextField>`s with the code shown below, which updates the `[(ngModel)]` bindings to point at the new `User` object:
161159

0 commit comments

Comments
 (0)