Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/deborahk/angular2-toh-displayingdata
- Owner: DeborahK
- License: apache-2.0
- Created: 2015-09-22T00:45:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-22T00:48:59.000Z (about 9 years ago)
- Last Synced: 2024-04-13T09:12:28.563Z (7 months ago)
- Language: TypeScript
- Size: 160 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
```