chore: update examples to TS2.0 (#2329)

This commit is contained in:
Filipe Silva 2016-09-14 18:15:51 +01:00 committed by Ward Bell
parent 6813ced018
commit 69ae63c4b1
15 changed files with 20 additions and 16 deletions

View File

@ -13,7 +13,9 @@
"license": "ISC",
"devDependencies": {
"protractor": "^3.3.0",
"typings": "^1.0.4"
"typings": "^1.0.4",
"ts-node": "^1.3.0",
"typescript": "^2.0.2"
},
"repository": {}
}

View File

@ -14,7 +14,7 @@
<script src="https://unpkg.com/zone.js@0.6.21"></script>
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
<script src="https://unpkg.com/typescript@2.0.2/lib/typescript.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>

View File

@ -15,7 +15,7 @@
<script src="https://unpkg.com/zone.js@0.6.21"></script>
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
<script src="https://unpkg.com/typescript@2.0.2/lib/typescript.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>

View File

@ -15,7 +15,7 @@
<script src="https://unpkg.com/zone.js@0.6.21"></script>
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
<script src="https://unpkg.com/typescript@2.0.2/lib/typescript.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>

View File

@ -51,6 +51,7 @@
"devDependencies": {
"angular-cli": "^1.0.0-beta.5",
"angular2-template-loader": "^0.4.0",
"awesome-typescript-loader": "^2.2.4",
"canonical-path": "0.0.2",
"concurrently": "^2.2.0",
"css-loader": "^0.23.1",
@ -79,9 +80,9 @@
"rollup-plugin-commonjs": "^4.1.0",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.2",
"ts-node": "^0.7.3",
"ts-node": "^1.3.0",
"tslint": "^3.15.1",
"typescript": "2.0.2",
"typescript": "^2.0.2",
"typings": "^1.3.2",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",

View File

@ -33,7 +33,7 @@
"devDependencies": {
"concurrently": "^2.2.0",
"lite-server": "^2.2.2",
"typescript": "^1.8.10",
"typescript": "^2.0.2",
"typings":"^1.3.2"
}
}

View File

@ -2,7 +2,7 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { Hero } from './hero.model.ts';
import { Hero } from './hero.model';
@Injectable()
export class HeroService {

View File

@ -2,7 +2,7 @@
// #docregion
import { Component } from '@angular/core';
import { Hero } from '../shared/hero.model.ts';
import { Hero } from '../shared/hero.model';
// #docregion example
@Component({

View File

@ -2,7 +2,7 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { Hero } from './hero.model.ts';
import { Hero } from './hero.model';
@Injectable()
export class HeroService {

View File

@ -2,7 +2,7 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Rx';
import { Hero } from './hero.model.ts';
import { Hero } from './hero.model';
@Injectable()
export class HeroService {

View File

@ -53,7 +53,7 @@
'rxjs': 'npm:rxjs',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js',
'typescript': 'npm:typescript@2.0.2/lib/typescript.js',
},
// packages tells the System loader how to load when no filename and/or no extension

View File

@ -40,7 +40,7 @@
'rxjs': 'npm:rxjs',
'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api',
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js',
'typescript': 'npm:typescript@2.0.2/lib/typescript.js',
},
// packages tells the System loader how to load when no filename and/or no extension

View File

@ -24,7 +24,7 @@ module.exports = {
loaders: [
{
test: /\.ts$/,
loaders: ['ts', 'angular2-template-loader']
loaders: ['awesome-typescript-loader', 'angular2-template-loader']
},
{
test: /\.html$/,

View File

@ -12,7 +12,7 @@ module.exports = {
loaders: [
{
test: /\.ts$/,
loaders: ['ts', 'angular2-template-loader']
loaders: ['awesome-typescript-loader', 'angular2-template-loader']
},
{
test: /\.html$/,

View File

@ -24,6 +24,7 @@
},
"devDependencies": {
"angular2-template-loader": "^0.4.0",
"awesome-typescript-loader": "^2.2.4",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
@ -41,7 +42,7 @@
"rimraf": "^2.5.2",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.1",
"typescript": "^1.8.10",
"typescript": "^2.0.2",
"typings": "^1.3.2",
"webpack": "^1.13.0",
"webpack-dev-server": "^1.14.1",