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: README.md
+20-30Lines changed: 20 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -10,20 +10,19 @@ The project bundles the NativeScript modules and Angular as source code dependen
10
10
$ git submodule update --init
11
11
```
12
12
13
+
# Prerequisites
14
+
15
+
Install your native toolchain and NativeScript as described in the docs:
16
+
17
+
https://docs.nativescript.org/setup/quick-setup
18
+
19
+
13
20
## Install dependencies
14
21
15
22
```
16
23
$ npm install -g grunt-cli
17
-
$ npm install -g tsd
18
-
$ npm install -g nativescript
19
24
```
20
25
21
-
You may need to configure your `tsd` GitHub access token to avoid rate-limit-related download errors. See the token installation instructions in the `.tsdrc` section [here](https://github.com/DefinitelyTyped/tsd#tsdrc).
22
-
23
-
You will also need the [Android SDK](https://developer.android.com/sdk/) to build this project. Install it manually before continuing with the next steps.
24
-
25
-
Then install the NativeScript tools according to: [this article](http://docs.nativescript.org/setup/quick-setup).
On Windows, you can wrap those commands in a BAT file.
66
67
67
-
# Finding your way around
68
-
69
-
1. The `./src/nativescript-angular` folder holds the integration source code.
70
-
2. The sample app below `ng-sample` is assembled by copying typescript dependencies in its `src` folder:
71
-
* angular2 source code
72
-
* nativescript-angular code
73
-
* NativeScript typings: typings/nativescript
74
-
3. All required JavaScript packages (including compiled NativeScript modules) are copied to `ng-sample/app/tns_modules`
75
-
76
-
# How the integration code works
77
-
78
-
1. Use the Angular Parse5DomAdapter to parse component markup.
79
-
2. Provide a custom renderer (`NativeScriptRenderer`) that works with the parsed DOM and creates NativeScript UI elements. Only limited number of visual elements supported so far.
68
+
Note that you should never change files in `ng-sample/src/nativescript-angular/` as they are overwritten with the reference sources in `src/nativescript-angular` on every `grunt app` run.
80
69
81
70
# Watch the video explaining Angular 2 and NativeScript
82
71
[NativeScript session on AngularConnect conference](https://www.youtube.com/watch?v=4SbiiyRSIwo)
83
72
84
73
# Explore the examples
85
74
75
+
The `ng-sample` app is meant for testing stuff while developing the renderer code, and isn't the best example out there. You can take a look at these sample apps that use the published builds from npm:
76
+
86
77
*[Hello world starter](https://github.com/NativeScript/template-hello-world-ng)
@@ -91,4 +82,3 @@ On Windows, you can wrap those commands in a BAT file.
91
82
1. There are certain issues with the Parse5DomAdapter and we'll likely need to provide our own later on:
92
83
* Element and attribute names always get lowercased.
93
84
* Self-closing elements (`<Label text="Name" /><Button text="Save" />`) get parsed wrong (in this case Button gets parsed as a Label child.
94
-
2. The renderer implementation is by no means complete: we are still need to support view (de)hydration, DOM text updates, event dispatching, actions, etc.
0 commit comments