Skip to content

antonybudianto7/angular2-tour-of-heroes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

  1. Must install pre-requisites npm install -g tsd typescript live-server

  2. Fork and cone this repo

  3. npm install

  4. Run the TypeScript compiler and watch for changes npm run tsc

  5. Open 2nd terminal and launch the app in the browser npm start

Notes

  • 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

From Scratch

  1. Create empty package.json

    npm init -y
  2. Install npm packages

    npm install --save angular2 systemjs traceur
  3. Make a source folder

    mkdir -p src/app
  4. Install typings files

    tsd install angular2 -rosa --config src/tsd.json
  5. Create a tsconfig.json file, in an editor

    {
    	"compilerOptions": {
    		"target": "ES5",
    		"module": "commonjs",
    		"sourceMap": true,
    		"emitDecoratorMetadata": true,
    		"experimentalDecorators": true,
    		"removeComments": false,
    		"noImplicitAny": true
    	}
    }
  6. Create app.ts and enter

    import {bootstrap, Component, View} from 'angular2/angular2';
    
    @Component({
    	selector: 'app'
    })
    @View({
    	template: '<h1>My First Angular 2 App</h1>'
    })
    export class AppComponent { }
    
    bootstrap(AppComponent);

About

Angular 2 - Tour of Heroes - The Next Step after Getting Started

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 69.3%
  • HTML 20.4%
  • CSS 10.3%