4,348
edits
delete initial notes |
add a link to Angular 2 by Examples |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= npm | [[Angular 2 by Examples]] | ||
= Running the app (via npm) = | |||
Compile just once. This executable binary is founder under <span class="shell">./npm_modules/.bin/</span> folder. | |||
<source lang="bash"> | |||
$ tsc | |||
</source> | |||
If <code>tsc</code> is not directly available. It can also be run this way: <code>npm run tsc</code>. | |||
If you want the server to watch for changes and compile on change (aka transpile) you can run the following command: | |||
<source lang="bash"> | |||
$ npm run tsc:w | |||
</source> | |||
== turn off connection logging == | == turn off connection logging == | ||
Line 26: | Line 42: | ||
An example event binding. | An example event binding. | ||
<source lang=" | <source lang="ts"> | ||
<button (click)="onSave()">Save</button> | <button (click)="onSave()">Save</button> | ||
</source> | </source> | ||
Line 32: | Line 48: | ||
Canonical form: | Canonical form: | ||
<source lang=" | <source lang="ts"> | ||
<button on-click="onSave()">Save</button> | <button on-click="onSave()">Save</button> | ||
</source> | </source> | ||
[https://developer.mozilla.org/en-US/docs/Web/Events List of events that can be used on MDN.] | [https://developer.mozilla.org/en-US/docs/Web/Events List of events that can be used on MDN.] |