-
Must install pre-requisites
npm install -g tsd typescript live-server -
Fork and cone this repo
-
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
- Replace mocks with http when ready
- /typings folder needs to be moved manually to the /src/typings folder
- paths in the typings must be fixed too
-
Create empty
package.jsonnpm init -y
-
Install npm packages
npm install --save angular2 systemjs traceur
-
Make a source folder
mkdir -p src/app
-
Install typings files
tsd install angular2 -rosa --config src/tsd.json
-
Create a
tsconfig.jsonfile, in an editor{ "compilerOptions": { "target": "ES5", "module": "commonjs", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "removeComments": false, "noImplicitAny": true } } -
Create
app.tsand enterimport {bootstrap, Component, View} from 'angular2/angular2'; @Component({ selector: 'app' }) @View({ template: '<h1>My First Angular 2 App</h1>' }) export class AppComponent { } bootstrap(AppComponent);