Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/deborahk/angular2-toh-displayingdata

Code for Displaying Data Chapter
https://github.com/deborahk/angular2-toh-displayingdata

Last synced: about 1 month ago
JSON representation

Code for Displaying Data Chapter

Awesome Lists containing this project

README

        

# Getting Started

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

1. Fork and cone this repo

1. `npm install`

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

1. 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
- Update file names with dots when SystemJS 0.19 lands

## From Scratch

1. Create empty `package.json`

```bash
npm init -y
```

1. Install npm packages

```bash
npm install --save angular2 systemjs traceur
```

1. Make a source folder

```bash
mkdir -p src/app
```

1. Install typings files

```bash
tsd install angular2 -rosa --config src/tsd.json
```

1. Create a `tsconfig.json` file, in an editor

```json
{
"compilerOptions": {
"target": "ES5",
"module": "commonjs",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": true
}
}
```

1. Create `app.ts` and enter

```javascript
import {bootstrap, Component, View} from 'angular2/angular2';

@Component({
selector: 'app'
})
@View({
template: '

My First Angular 2 App

'
})
export class AppComponent { }

bootstrap(AppComponent);
```