Skip to content

Commit 7ed661a

Browse files
committed
Successfully upgraded to angular 2 RC1
VS Tooling Fix: microsoft/TypeScript#8518
1 parent 32a11aa commit 7ed661a

20 files changed

+87
-87
lines changed
+40-30
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
11
{
2-
"name": "angular2-quickstart",
3-
"version": "1.0.0",
4-
"scripts": {
5-
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
6-
"tsc": "tsc",
7-
"tsc:w": "tsc -w",
8-
"lite": "lite-server",
9-
"typings": "typings",
10-
"postinstall": "typings install"
11-
},
12-
"license": "ISC",
13-
"dependencies": {
14-
"angular2": "2.0.0-beta.17",
15-
"es6-shim": "^0.35.0",
16-
"reflect-metadata": "0.1.2",
17-
"rxjs": "5.0.0-beta.2",
18-
"zone.js": "0.6.12",
19-
"systemjs": "0.19.26",
20-
"a2-in-memory-web-api": "0.1.15",
21-
"jquery": "^2.2.3",
22-
"toastr": "2.1.2",
23-
"bootstrap": "^3.3.6",
24-
"material-design-lite": "^1.1.3"
25-
},
26-
"devDependencies": {
27-
"concurrently": "^2.0.0",
28-
"lite-server": "^2.2.0",
29-
"typescript": "^1.8.10",
30-
"typings": "^0.8.1"
31-
}
2+
"name": "angular2-quickstart",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
6+
"tsc": "tsc",
7+
"tsc:w": "tsc -w",
8+
"lite": "lite-server",
9+
"typings": "typings",
10+
"postinstall": "typings install"
11+
},
12+
"license": "ISC",
13+
"dependencies": {
14+
"@angular/common": "2.0.0-rc.1",
15+
"@angular/compiler": "2.0.0-rc.1",
16+
"@angular/core": "2.0.0-rc.1",
17+
"@angular/http": "2.0.0-rc.1",
18+
"@angular/platform-browser": "2.0.0-rc.1",
19+
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
20+
"@angular/router": "2.0.0-rc.1",
21+
"@angular/router-deprecated": "2.0.0-rc.1",
22+
"@angular/upgrade": "2.0.0-rc.1",
23+
24+
"systemjs": "0.19.27",
25+
"core-js": "^2.4.0",
26+
"reflect-metadata": "^0.1.3",
27+
"rxjs": "5.0.0-beta.6",
28+
"zone.js": "^0.6.12",
29+
30+
"angular2-in-memory-web-api": "0.0.9",
31+
"bootstrap": "^3.3.6",
32+
"jquery": "^2.2.3",
33+
"toastr": "2.1.2",
34+
"material-design-lite": "^1.1.3"
35+
},
36+
"devDependencies": {
37+
"concurrently": "^2.0.0",
38+
"lite-server": "^2.2.0",
39+
"typescript": "^1.8.10",
40+
"typings": "^0.8.1"
41+
}
3242
}

InterviewPrep.Angular2FirstLook/tsconfig.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
"compileOnSave": true,
33
"compilerOptions": {
44
"target": "es5",
5-
"module": "system",
5+
"module": "commonjs",
66
"moduleResolution": "node",
77
"sourceMap": true,
88
"emitDecoratorMetadata": true,
99
"experimentalDecorators": true,
1010
"removeComments": true,
11-
"noImplicitAny": true,
12-
"noEmitOnError": true
11+
"noImplicitAny": true
1312
},
1413
"exclude": [
1514
"node_modules",

InterviewPrep.Angular2FirstLook/typings.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"ambientDependencies": {
3-
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd",
4-
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#5c182b9af717f73146399c2485f70f1e2ac0ff2b",
3+
"core-js": "registry:dt/core-js#0.0.0+20160317120654",
4+
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
5+
"node": "registry:dt/node#4.0.0+20160509154515",
6+
57
"jquery": "registry:dt/jquery#1.10.0+20160417213236",
68
"material-design-lite": "registry:dt/material-design-lite#1.1.3+20160423150231",
79
"toastr": "registry:dt/toastr#2.0.1+20160316155526"

InterviewPrep.Angular2FirstLook/wwwroot/app/appComponent.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {Component, provide, OpaqueToken} from "angular2/core"
2-
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from "angular2/router"
3-
import {InMemoryBackendService, SEED_DATA} from 'a2-in-memory-web-api/core';
1+
import {Component, provide, OpaqueToken} from "@angular/core"
2+
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS } from "@angular/router-deprecated"
3+
import {InMemoryBackendService, SEED_DATA} from "angular2-in-memory-web-api/";
44
import {InMemoryDb} from "../fakeApi/inMemoryDb"
5-
import {HTTP_PROVIDERS, XHRBackend} from "angular2/http"
5+
import {HTTP_PROVIDERS, XHRBackend} from "@angular/http"
66
import {DashboardComponent, StaticVehicleService, VehicleService, VehiclesComponent,
77
VehicleListComponent, VehicleComponent, SpinnerComponent, SpinnerService} from "./appCore"
88

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/customPipe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Pipe, PipeTransform} from "angular2/core"
1+
import {Pipe, PipeTransform} from "@angular/core"
22

33
@Pipe({ name: "CustomPipe" })
44
export class CustomPipe implements PipeTransform

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/filterText/filterTextComponent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Output, EventEmitter} from "angular2/core"
1+
import {Component, Output, EventEmitter} from "@angular/core"
22

33
@Component({
44
selector: "filterText",

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/filterText/filterTextService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Injectable} from "angular2/core"
1+
import {Injectable} from "@angular/core"
22

33
@Injectable()
44
export class FilterTextService

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/lowerCasePipe.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Pipe, PipeTransform} from "angular2/core"
1+
import {Pipe, PipeTransform} from "@angular/core"
22

33
@Pipe({ name: "LowerCasePipe" })
44
export class LowerCasePipe implements PipeTransform

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/nestedComponent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Input} from "angular2/core"
1+
import {Component, Input} from "@angular/core"
22

33
@Component({
44
selector: "nested",

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/spinner/spinnerComponent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, OnInit, OnDestroy} from "angular2/core"
1+
import {Component, OnInit, OnDestroy} from "@angular/core"
22
import {Subscription} from "rxjs/Rx"
33
import {SpinnerService} from "./spinnerService"
44

InterviewPrep.Angular2FirstLook/wwwroot/app/blocks/spinner/spinnerService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Injectable } from "angular2/core";
1+
import { Injectable } from "@angular/core";
22
import { Observable, Subject } from "rxjs/Rx";
33

44
export interface ISpinnerState
@@ -15,7 +15,7 @@ export class SpinnerService
1515

1616
constructor()
1717
{
18-
this._spinnerSubject = new Subject();
18+
this._spinnerSubject = new Subject<ISpinnerState>();
1919
this.spinnerState = this._spinnerSubject.asObservable();
2020
}
2121

InterviewPrep.Angular2FirstLook/wwwroot/app/dashboard/dashboardComponent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, OnInit, Inject, EventEmitter, Output, AfterViewInit, ChangeDetectorRef} from "angular2/core"
1+
import {Component, OnInit, Inject, EventEmitter, Output, AfterViewInit, ChangeDetectorRef} from "@angular/core"
22
import {Observable} from "rxjs/Rx"
33
import {IVehicleService} from "../vehicles/vehicles"
44
import {CustomPipe, NestedComponent, LowerCasePipe} from "../blocks/blocks"
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import {bootstrap} from "angular2/platform/browser";
2-
import {provide} from "angular2/core"
1+
import {bootstrap} from "@angular/platform-browser-dynamic";
2+
import {provide} from "@angular/core"
33
import {AppComponent} from "./appComponent";
4-
import {ROUTER_PROVIDERS} from "angular2/router"
5-
import {LocationStrategy, HashLocationStrategy, APP_BASE_HREF, PathLocationStrategy} from "angular2/platform/common"
4+
import {ROUTER_PROVIDERS} from "@angular/router-deprecated"
5+
import {LocationStrategy, HashLocationStrategy, APP_BASE_HREF, PathLocationStrategy} from "@angular/common"
6+
import "rxjs/Rx"
67

78
bootstrap(AppComponent, [ROUTER_PROVIDERS, provide(APP_BASE_HREF, { useValue: '/' }),
89
provide(LocationStrategy, { useClass: HashLocationStrategy })]);

InterviewPrep.Angular2FirstLook/wwwroot/app/vehicles/IVehicleService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {Observable} from "rxjs/Rx"
2-
import {OpaqueToken} from "angular2/core"
2+
import {OpaqueToken} from "@angular/core"
33

44
export interface IVehicleService
55
{

InterviewPrep.Angular2FirstLook/wwwroot/app/vehicles/VehiclesComponent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Component} from "angular2/core"
2-
import {RouteConfig, ROUTER_DIRECTIVES} from "angular2/router"
1+
import {Component} from "@angular/core"
2+
import {RouteConfig, ROUTER_DIRECTIVES} from "@angular/router-deprecated"
33
import {VehicleComponent, VehicleListComponent} from "./vehicles"
44

55
@Component({

InterviewPrep.Angular2FirstLook/wwwroot/app/vehicles/staticVehicleService.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Injectable} from 'angular2/core';
2-
import {Http, Response} from 'angular2/http';
1+
import {Injectable} from '@angular/core';
2+
import {Http, Response} from '@angular/http';
33
import {Observable, Operator} from "rxjs/Rx"
44
import {IVehicleService} from "./vehicles"
55
import {SpinnerService} from "../blocks/blocks"
@@ -13,10 +13,10 @@ export class StaticVehicleService implements IVehicleService
1313
{
1414
this._spinnerService.show();
1515
var promise = this.httpService.get("/api/vehicles")
16-
.map((response: Response) => <IBaseData[]>(response.json().data))
1716
.do(data => console.log())
1817
.catch(this.handleError)
19-
.finally(() => this._spinnerService.hide());
18+
.finally(() => this._spinnerService.hide())
19+
.map((response: Response) => <IBaseData[]>(response.json().data))
2020

2121
//var promise = Observable.create((observer: any) =>
2222
//{

InterviewPrep.Angular2FirstLook/wwwroot/app/vehicles/vehicleComponent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Component, Inject, OnInit, Input} from "angular2/core"
2-
import {RouteParams, Router} from "angular2/router"
1+
import {Component, Inject, OnInit, Input} from "@angular/core"
2+
import {RouteParams, Router} from "@angular/router-deprecated"
33
import {IVehicleService } from "./vehicles"
44

55
@Component({

InterviewPrep.Angular2FirstLook/wwwroot/app/vehicles/vehicleListComponent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Component, OnInit, AfterViewInit, Inject, EventEmitter, Output, ViewChild, ChangeDetectorRef} from "angular2/core"
2-
import {ROUTER_DIRECTIVES, RouteConfig} from "angular2/router"
1+
import {Component, OnInit, AfterViewInit, Inject, EventEmitter, Output, ViewChild, ChangeDetectorRef} from "@angular/core"
2+
import {ROUTER_DIRECTIVES, RouteConfig} from "@angular/router-deprecated"
33
import {Observable} from "rxjs/rx"
44
import {IVehicleService, VehicleComponent } from "./vehicles"
55
import {NestedComponent, CustomPipe, FilterTextService, FilterTextComponent, LowerCasePipe} from "../blocks/blocks"

InterviewPrep.Angular2FirstLook/wwwroot/app/vehicles/vehicleService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import {Injectable} from "angular2/core"
2-
import {Http} from "angular2/http"
1+
import {Injectable} from "@angular/core"
2+
import {Http} from "@angular/http"
33
import {Observable} from "rxjs/Rx"
44
import {IVehicleService} from "./vehicles"
55

InterviewPrep.Angular2FirstLook/wwwroot/index.html

+10-22
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,29 @@
33
<title>Angular 2 First Look</title>
44
<meta name="viewport" content="width=device-width, initial-scale=1">
55
<!--<base href="/">-->
6-
<!-- 1. Load libraries -->
7-
<!-- IE required polyfills, in this exact order -->
86
<link rel="stylesheet" href="node_modules/toastr/build/toastr.css" />
97
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
108

11-
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
12-
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
13-
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
14-
15-
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
16-
<script src="node_modules/systemjs/dist/system.src.js"></script>
17-
<script src="node_modules/rxjs/bundles/Rx.js"></script>
18-
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
19-
<script src="node_modules/angular2/bundles/router.dev.js"></script>
20-
<script src="node_modules/angular2/bundles/http.dev.js"></script>
21-
<script src="node_modules/a2-in-memory-web-api/web-api.js"></script>
229
<script src="node_modules/jquery/dist/jquery.min.js"></script>
2310
<script src="node_modules/toastr/build/toastr.min.js"></script>
2411
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
12+
2513
<!-- MDL-->
2614
<link rel="stylesheet" href="/node_modules/material-design-lite/material.min.css">
2715
<script src="/node_modules/material-design-lite/material.min.js"></script>
2816
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
2917

30-
<!-- 2. Configure SystemJS -->
18+
<!-- Core -->
19+
<script src="node_modules/zone.js/dist/zone.js"></script>
20+
<script src="node_modules/reflect-metadata/Reflect.js"></script>
21+
<script src="node_modules/systemjs/dist/system.src.js"></script>
22+
23+
<!-- Configure SystemJS -->
24+
<script src="systemjs.config.js"></script>
3125
<script>
32-
System.config({
33-
packages: {
34-
app: { format: 'register', defaultExtension: 'js' },
35-
fakeApi: { format: 'register', defaultExtension: 'js' }
36-
}
37-
});
38-
System.import('app/main')
39-
.then(null, console.error.bind(console));
26+
System.import('app').catch(function (err) { console.error(err); });
4027
</script>
28+
4129
</head>
4230

4331
<!-- 3. Display the application -->

0 commit comments

Comments
 (0)