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
+8-24Lines changed: 8 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ <h1>Building Apps with NativeScript and Angular 2</h1>
30
30
<h2id="building-apps-with-nativescript-and-angular-2">Building Apps with NativeScript and Angular 2</h2>
31
31
<p>Welcome to the NativeScript & Angular 2 getting started guide 📚. In this hands-on tutorial, you’ll build a cross-platform iOS and Android app from scratch.</p>
32
32
<blockquote>
33
-
<p><strong>IMPORTANT</strong>: NativeScript’s Angular integration is in beta. Refer to <ahref="#chapter8.0">this guide’s appendix</a> for a list of known issues that may affect you while going through this tutorial.</p>
33
+
<p><strong>IMPORTANT</strong>: NativeScript’s Angular integration is in beta. If you run into any issues completing this guide, please log those issues on our <ahref="https://github.com/NativeScript/nativescript-angular/issues">nativescript-angular GitHub repo</a>.</p>
34
34
</blockquote>
35
35
<h3id="what-is-nativescript-what-is-angular-2-">What is NativeScript? What is Angular 2?</h3>
36
36
<divclass="intro-box">
@@ -88,7 +88,7 @@ <h4 class="exercise-start">
88
88
89
89
<p><strong>Step 1: Install Node.js</strong></p>
90
90
<p>The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.</p>
91
-
<p>You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing <code>node --version</code>. If you get an error, head to the <ahref="https://nodejs.org/">https://nodejs.org/</a> and download and install the latest “LTS” distribution for your development machine.</p>
91
+
<p>You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing <code>node --version</code>. If you get an error, head to the <ahref="https://nodejs.org/">https://nodejs.org/</a> and download and install the latest “LTS” (long-term support) distribution for your development machine.</p>
92
92
<blockquote>
93
93
<p><strong>TIP</strong>: The NativeScript CLI supports a wide variety of Node.js versions, so if you already have Node.js installed you should be good to go. If, by chance, you’re running an unsupported version, the <code>tns doctor</code> command we’ll run momentarily will flag the problem so you can upgrade.</p>
94
94
</blockquote>
@@ -211,14 +211,9 @@ <h4 class="exercise-start">
211
211
</h4>
212
212
213
213
<p>If your previous <code>tns run ios</code> or <code>tns run android</code> task is still running, type <code>Ctrl+C</code> in your terminal to kill it.</p>
214
-
<!--
215
-
If you’re on a Mac, start an iOS livesync watcher by executing the following command:
216
-
217
-
```
218
-
tns livesync ios --emulator --watch
219
-
```
220
-
-->
221
-
<p>If you have your app running on an Android emulator, start an Android livesync watcher by executing the following command:</p>
214
+
<p>If you’re on a Mac, start an iOS livesync watcher by executing the following command:</p>
215
+
<pre><code>tns livesync ios --emulator --watch
216
+
</code></pre><p>If you have your app running on an Android emulator, start an Android livesync watcher by executing the following command:</p>
</code></pre><p>If you instead have your app running on a USB-connected Android device or Genymotion virtual device, run the same command without the <code>--emulator</code> flag:</p>
224
219
<pre><code>tns livesync android --watch
@@ -236,8 +231,8 @@ <h4 class="exercise-start">
236
231
export class AppComponent {}
237
232
</code></pre>
238
233
<p>Save <code>app/app.component.ts</code> and you should see the app relaunch and the updated text displayed.</p>
<p>If you’re on a Mac building for iOS, the workflow is currently a bit different, as the <code>tns livesync ios</code> command is not yet supported. (See the <ahref="#chapter8.0">known issues</a> for details.) To see the updated text on iOS, type <code>Ctrl+C</code> to kill your previous <code>tns run ios</code> command, and then re-execute <code>tns run ios --emulator</code> to launch the app with your changes.</p>
<p>Regardless of whether you’re running on iOS or Android, or whether you’re using <code>tns livesync</code> or <code>tns run</code>, the NativeScript CLI shows the output of <code>console.log()</code> statements as your app executes, as well as stack traces when things go wrong. So if your app crashes at any time during this guide, look to the terminal for a detailed report of the problem.</p>
<p><strong>TIP</strong>: When you're trying to debug a problem, try adding <code>console.log()</code> statements in your JavaScript code—exactly as you would in a browser-based application.</p>
252
-
<p><strong>WARNING</strong>: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (<code>Info.plist</code>, <code>AndroidManifest.xml</code>, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use <code>Ctrl+C</code> to stop livesync, and rerun the application using the <code>tns run android</code>command. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.</p>
247
+
<p><strong>WARNING</strong>: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (<code>Info.plist</code>, <code>AndroidManifest.xml</code>, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use <code>Ctrl+C</code> to stop livesync, and rerun the application using the <code>tns run ios</code> or <code>tns run android</code>commands. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.</p>
253
248
</blockquote>
254
249
<p>Now that you've created an app, configured your environment, and set up your app to run on iOS and Android, you're ready to start digging into the files that make up a NativeScript app.</p>
255
250
@@ -1982,17 +1977,6 @@ <h3 id="let-us-know-what-you-think">Let us know what you think</h3>
1982
1977
<p>Finally, we’d love if you could take a minute to tell us what you thought about the this guide. Your feedback helps us make this tutorial better.</p>
<p>As NativeScript’s Angular integration is still in beta, there are a few outstanding issues you may hit while completing this guide. Here are the major ones:</p>
1990
-
<ul>
1991
-
<li><strong>1</strong>) You may get a “Service exited due to signal: Killed: 9” error when deploying an app to an iOS simulator. If you hit this issue, <ahref="https://github.com/NativeScript/nativescript-angular/issues/101">refer to the GitHub issue</a> for details on the problem and workarounds.</li>
1992
-
<li><strong>2</strong>) The <code>tns livesync</code> command currently does not work on iOS apps. Because of this, for now, you must run <code>tns run ios --emulator</code> after each change you make to your app in order to see the changes rendered. <ahref="https://github.com/NativeScript/nativescript-angular/issues/167">Follow this problem’s GitHub issue</a> for updates.</li>
1993
-
</ul>
1994
-
<p>You can refer to the <ahref="https://github.com/NativeScript/nativescript-angular/issues">nativescript-angular</a> repo on GitHub for a <ahref="https://github.com/NativeScript/nativescript-angular/issues">full list of issues</a>, and to <ahref="https://github.com/NativeScript/nativescript-angular/issues/new">report any problems you have</a>.</p>
Copy file name to clipboardExpand all lines: src/chapters/chapter0.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Welcome to the NativeScript & Angular 2 getting started guide 📚. In this hands-on tutorial, you’ll build a cross-platform iOS and Android app from scratch.
4
4
5
-
> **IMPORTANT**: NativeScript’s Angular integration is in beta. Refer to [this guide’s appendix](#chapter8.0) for a list of known issues that may affect you while going through this tutorial.
5
+
> **IMPORTANT**: NativeScript’s Angular integration is in beta. If you run into any issues completing this guide, please log those issues on our [nativescript-angular GitHub repo](https://github.com/NativeScript/nativescript-angular/issues).
Copy file name to clipboardExpand all lines: src/chapters/chapter1.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The NativeScript CLI has a few system requirements you must have in place before
14
14
15
15
The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.
16
16
17
-
You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing `node --version`. If you get an error, head to the https://nodejs.org/ and download and install the latest “LTS” distribution for your development machine.
17
+
You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing `node --version`. If you get an error, head to the https://nodejs.org/ and download and install the latest “LTS” (long-term support) distribution for your development machine.
18
18
19
19
> **TIP**: The NativeScript CLI supports a wide variety of Node.js versions, so if you already have Node.js installed you should be good to go. If, by chance, you’re running an unsupported version, the `tns doctor` command we’ll run momentarily will flag the problem so you can upgrade.
20
20
@@ -204,13 +204,11 @@ At this point, you have the NativeScript CLI downloaded and installed, as well a
204
204
205
205
If your previous `tns run ios` or `tns run android` task is still running, type `Ctrl+C` in your terminal to kill it.
206
206
207
-
<!--
208
207
If you’re on a Mac, start an iOS livesync watcher by executing the following command:
209
208
210
209
```
211
210
tns livesync ios --emulator --watch
212
211
```
213
-
-->
214
212
215
213
If you have your app running on an Android emulator, start an Android livesync watcher by executing the following command:
216
214
@@ -242,10 +240,9 @@ export class AppComponent {}
242
240
243
241
Save `app/app.component.ts` and you should see the app relaunch and the updated text displayed.
If you’re on a Mac building for iOS, the workflow is currently a bit different, as the `tns livesync ios` command is not yet supported. (See the [known issues](#chapter8.0) for details.) To see the updated text on iOS, type `Ctrl+C` to kill your previous `tns run ios` command, and then re-execute `tns run ios --emulator` to launch the app with your changes.
248
-
249
246
<divclass="exercise-end"></div>
250
247
251
248
Regardless of whether you’re running on iOS or Android, or whether you’re using `tns livesync` or `tns run`, the NativeScript CLI shows the output of `console.log()` statements as your app executes, as well as stack traces when things go wrong. So if your app crashes at any time during this guide, look to the terminal for a detailed report of the problem.
> **TIP**: When you're trying to debug a problem, try adding `console.log()` statements in your JavaScript code—exactly as you would in a browser-based application.
268
265
269
-
> **WARNING**: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (`Info.plist`, `AndroidManifest.xml`, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use `Ctrl+C` to stop livesync, and rerun the application using the `tns run android`command. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.
266
+
> **WARNING**: Not all changes can be livesync’d in a NativeScript app. For instance, livesync cannot patch native configuration file changes (`Info.plist`, `AndroidManifest.xml`, and so forth), new plugin installations, and any other change that requires a full compilation of the application. In those cases, you’ll want to use `Ctrl+C` to stop livesync, and rerun the application using the `tns run ios` or `tns run android`commands. Don’t worry though; when situations that require a full compilation come up in this guide, these instructions will be explicitly listed.
270
267
271
268
Now that you've created an app, configured your environment, and set up your app to run on iOS and Android, you're ready to start digging into the files that make up a NativeScript app.
0 commit comments