You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+95-3Lines changed: 95 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -779,7 +779,7 @@ <h4 class="exercise-start">
779
779
this._userService.register(this.user)
780
780
.subscribe(
781
781
() => {
782
-
alert("Your account was successfully created.")
782
+
alert("Your account was successfully created.");
783
783
this.toggleDisplay();
784
784
},
785
785
() => alert("Unfortunately we were unable to create your account.")
@@ -828,7 +828,7 @@ <h4 class="exercise-start">
828
828
this._userService.register(this.user)
829
829
.subscribe(
830
830
() => {
831
-
alert("Your account was successfully created.")
831
+
alert("Your account was successfully created.");
832
832
this.toggleDisplay();
833
833
},
834
834
() => alert("Unfortunately we were unable to create your account.")
@@ -841,8 +841,100 @@ <h4 class="exercise-start">
841
841
</code></pre>
842
842
<divclass="exercise-end"></div>
843
843
844
-
<p>Show that user account creation now works and transition to routing.</p>
844
+
<p>TODO: Show that user account creation now works and transition to routing.</p>
845
845
<h3id="routing">Routing</h3>
846
+
<p>TODO: Intro</p>
847
+
<h4class="exercise-start">
848
+
<b>Exercise</b>: ???
849
+
</h4>
850
+
851
+
<p>Copy app/app.component.ts into app/pages/login/login.component.ts, change the name of the class from “AppComponent” to “LoginPage, and update the two paths below accordingly:</p>
852
+
<pre><codeclass="lang-TypeScript">import {User} from "../../shared/user/user";
853
+
import {UserService} from "../../shared/user/user.service";
854
+
</code></pre>
855
+
<p>Open app/app.component.ts back up and paste in the following code:</p>
856
+
<pre><codeclass="lang-TypeScript">import {Component} from "angular2/core";
857
+
import {HTTP_PROVIDERS} from "angular2/http";
858
+
import {RouteConfig} from "angular2/router";
859
+
import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "nativescript-angular/router";
860
+
import {LoginPage} from "./pages/login/login.component";
<p>You can login now! And navigate! Show a gif of the navigation. Talk about how in NativeScript you get native behavior automatically—aka a back button on iOS and a hardware back button on Android.</p>
Copy file name to clipboardExpand all lines: src/chapters/chapter3.md
+130-3Lines changed: 130 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -332,7 +332,7 @@ signUp() {
332
332
this._userService.register(this.user)
333
333
.subscribe(
334
334
() => {
335
-
alert("Your account was successfully created.")
335
+
alert("Your account was successfully created.");
336
336
this.toggleDisplay();
337
337
},
338
338
() =>alert("Unfortunately we were unable to create your account.")
@@ -387,7 +387,7 @@ export class AppComponent {
387
387
this._userService.register(this.user)
388
388
.subscribe(
389
389
() => {
390
-
alert("Your account was successfully created.")
390
+
alert("Your account was successfully created.");
391
391
this.toggleDisplay();
392
392
},
393
393
() =>alert("Unfortunately we were unable to create your account.")
@@ -401,6 +401,133 @@ export class AppComponent {
401
401
402
402
<divclass="exercise-end"></div>
403
403
404
-
Show that user account creation now works and transition to routing.
404
+
TODO: Show that user account creation now works and transition to routing.
405
405
406
406
### Routing
407
+
408
+
TODO: Intro
409
+
410
+
<h4class="exercise-start">
411
+
<b>Exercise</b>: ???
412
+
</h4>
413
+
414
+
Copy app/app.component.ts into app/pages/login/login.component.ts, change the name of the class from “AppComponent” to “LoginPage, and update the two paths below accordingly:
You can login now! And navigate! Show a gif of the navigation. Talk about how in NativeScript you get native behavior automatically—aka a back button on iOS and a hardware back button on Android.
0 commit comments