Installare AngularJS 2.0 e confirgurare il primo progetto

Parte prima: Installiamo NodeJS
#### SETUP APT ———————–
deb https://deb.nodesource.com/node_6.x xenial main
deb-src https://deb.nodesource.com/node_6.x xenial main
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add –
apt update
apt-cache policy nodejs
apt install nodejs
nodejs –version

Parte seconda: Installiamo NPM e Typescript
###### GLOBAL LIBS (sudo) ——————————-

npm install -g npm@latest
npm install -g typescript

Parte Terza: Installiamo angular-cli
npm uninstall -g angular-cli
npm cache clean
npm install -g angular-cli@latest

# node-gyp@3.5.0 should be installed with -g
# npm install -g node-gyp

Parte Quarta: creazione progetto

ng new example
ng new example_routing –routing true

quindi lo avviamo con il server interno…
ng serve

Per creare classi e modelli
#### ng generate | ng g

ng g class models/my-new-class
ng g interface models/my-new-interface
ng g enum models/my-new-enum
ng g pipe pipes/my-new-pipe
ng g service services/my-new-service

Per creare componenti
ng g component my-new-component
ng g module my-module
ng g directive my-new-directive

per creare il compilato da installare sul server:
ng build