Skip to content

saeedallahyari/angular2-tour-of-heroes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

  1. Fork and clone this repo

  2. npm install

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

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

Notes

  • Add redirectTo and/or otherwise routes
  • Fix http as it evolves
  • Manual typings fix for Pipes angular/angular#4279
  • Replace mocks with http when ready

From Scratch

  1. Create empty package.json

    npm init -y
  2. Install npm packages

    npm install --save --save-exact angular2 systemjs

npm install --save-dev typescript tsd live-server ```

  1. Make a source folder

    mkdir -p src/app
  2. Create a tsconfig.json file, in an editor

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

    import {bootstrap, Component, View} from 'angular2/angular2';
    
    @Component({
    	selector: 'app'
    })
    @View({
    	template: '<h1>My First Angular 2 App</h1>'
    })
    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 62.6%
  • CSS 19.1%
  • HTML 18.3%