Example with a most of the major Angular concepts.
-
Run
npm install
-
Run the TypeScript compiler and watch for changes
npm run tsc
-
Open 2nd terminal and launch the app in the browser
npm start
- Add redirectTo and/or otherwise routes
- Fix http as it evolves
- Manual typings fix for Pipes angular/angular#4279
(draft)
-
Create empty
package.json
npm init -y
-
Install npm packages
npm install --save --save-exact angular2 systemjs npm install --save-dev typescript tsd live-server
-
Make a source folder
mkdir -p src/app
-
Create a
tsconfig.json
file, in an editor{ "compilerOptions": { "target": "ES5", "module": "commonjs", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": true } }
-
Create
app.ts
and enterimport {bootstrap, Component, View} from 'angular2/angular2'; @Component({ selector: 'app', template: '<h1>Dashboard</h1>' }) export class AppComponent { } bootstrap(AppComponent);