Skip to content

Commit 07d215d

Browse files
committed
Update to RC 1 using router-deprecated
1 parent da4e6a9 commit 07d215d

13 files changed

+80
-43
lines changed

APM - Final Updated/.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files.exclude": {
44
"**/.git": true,
55
"**/.DS_Store": true,
6-
"**/*.js": true,
6+
"**/app/**/*.js": true,
77
"**/*.map": true
88
},
99
// Controls auto save of dirty files. Accepted values: "off", "afterDelay", "onFocusChange". If set to "afterDelay" you can configure the delay in "files.autoSaveDelay".

APM - Final Updated/app/app.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { Component } from 'angular2/core';
2-
import { HTTP_PROVIDERS } from 'angular2/http';
1+
import { Component } from '@angular/core';
2+
import { HTTP_PROVIDERS } from '@angular/http';
33
import 'rxjs/Rx'; // Load all features
4-
import { ROUTER_PROVIDERS, RouteConfig, ROUTER_DIRECTIVES } from 'angular2/router';
4+
import { ROUTER_PROVIDERS, RouteConfig, ROUTER_DIRECTIVES } from '@angular/router-deprecated';
55

66
import { ProductListComponent } from './products/product-list.component';
77
import { ProductService } from './products/product.service';

APM - Final Updated/app/home/welcome.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from 'angular2/core';
1+
import { Component } from '@angular/core';
22

33
@Component({
44
templateUrl: 'app/home/welcome.component.html'

APM - Final Updated/app/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { bootstrap } from 'angular2/platform/browser';
1+
import { bootstrap } from '@angular/platform-browser-dynamic';
22

33
// Our main component
44
import { AppComponent } from './app.component';

APM - Final Updated/app/products/product-detail.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Component, OnInit } from 'angular2/core';
2-
import { RouteParams, Router } from 'angular2/router';
1+
import { Component, OnInit } from '@angular/core';
2+
import { RouteParams, Router } from '@angular/router-deprecated';
33

44
import { IProduct } from './product';
55
import { ProductService } from './product.service';

APM - Final Updated/app/products/product-filter.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PipeTransform, Pipe } from 'angular2/core';
1+
import { PipeTransform, Pipe } from '@angular/core';
22
import { IProduct } from './product';
33

44
@Pipe({

APM - Final Updated/app/products/product-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Component, OnInit } from 'angular2/core';
2-
import { ROUTER_DIRECTIVES } from 'angular2/router';
1+
import { Component, OnInit } from '@angular/core';
2+
import { ROUTER_DIRECTIVES } from '@angular/router-deprecated';
33

44
import { IProduct } from './product';
55
import { ProductFilterPipe } from './product-filter.pipe';

APM - Final Updated/app/products/product.service.ts

Lines changed: 2 additions & 2 deletions
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 } from 'rxjs/Observable';
44

55
import { IProduct } from './product';

APM - Final Updated/app/shared/star.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnChanges, Input,
2-
Output, EventEmitter } from 'angular2/core';
2+
Output, EventEmitter } from '@angular/core';
33

44
@Component({
55
selector: 'ai-star',

APM - Final Updated/index.html

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,17 @@
99
<link href="node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet" />
1010
<link href="app/app.component.css" rel="stylesheet" />
1111

12-
<!-- 1. Load libraries -->
13-
<!-- IE required polyfills, in this exact order -->
14-
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
12+
<!-- Polyfill(s) for older browsers -->
1513
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
16-
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
1714

15+
<script src="node_modules/zone.js/dist/zone.js"></script>
16+
<script src="node_modules/reflect-metadata/Reflect.js"></script>
1817
<script src="node_modules/systemjs/dist/system.src.js"></script>
19-
<script src="node_modules/rxjs/bundles/Rx.js"></script>
20-
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
2118

22-
<!-- Required for http -->
23-
<script src="node_modules/angular2/bundles/http.dev.js"></script>
24-
25-
<!-- Required for routing -->
26-
<script src="node_modules/angular2/bundles/router.dev.js"></script>
27-
28-
<!-- 2. Configure SystemJS -->
19+
<!-- Configure SystemJS -->
20+
<script src="systemjs.config.js"></script>
2921
<script>
30-
System.config({
31-
packages: {
32-
app: {
33-
format: 'register',
34-
defaultExtension: 'js'
35-
}
36-
}
37-
});
38-
System.import('app/main')
39-
.then(null, console.error.bind(console));
22+
System.import('app').catch(function(err){ console.error(err); });
4023
</script>
4124
</head>
4225

APM - Final Updated/package.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,22 @@
1414
},
1515
"license": "ISC",
1616
"dependencies": {
17-
"angular2": "2.0.0-beta.17",
18-
"systemjs": "0.19.26",
17+
"@angular/common": "2.0.0-rc.1",
18+
"@angular/compiler": "2.0.0-rc.1",
19+
"@angular/core": "2.0.0-rc.1",
20+
"@angular/http": "2.0.0-rc.1",
21+
"@angular/platform-browser": "2.0.0-rc.1",
22+
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
23+
"@angular/router": "2.0.0-rc.1",
24+
"@angular/router-deprecated": "2.0.0-rc.1",
25+
"@angular/upgrade": "2.0.0-rc.1",
26+
27+
"systemjs": "0.19.27",
1928
"es6-shim": "^0.35.0",
20-
"reflect-metadata": "0.1.2",
21-
"rxjs": "5.0.0-beta.2",
29+
"reflect-metadata": "^0.1.3",
30+
"rxjs": "5.0.0-beta.6",
2231
"zone.js": "^0.6.12",
32+
2333
"bootstrap": "^3.3.6"
2434
},
2535
"devDependencies": {
@@ -30,4 +40,4 @@
3040
"typings": "^0.8.1"
3141
},
3242
"repository": {}
33-
}
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* System configuration for Angular 2 samples
3+
* Adjust as necessary for your application needs.
4+
*/
5+
(function(global) {
6+
7+
// map tells the System loader where to look for things
8+
var map = {
9+
'app': 'app',
10+
'rxjs': 'node_modules/rxjs',
11+
'@angular': 'node_modules/@angular'
12+
};
13+
14+
// packages tells the System loader how to load when no filename and/or no extension
15+
var packages = {
16+
'app': { main: 'main.js', defaultExtension: 'js' },
17+
'rxjs': { defaultExtension: 'js' }
18+
};
19+
20+
var packageNames = [
21+
'@angular/common',
22+
'@angular/compiler',
23+
'@angular/core',
24+
'@angular/http',
25+
'@angular/platform-browser',
26+
'@angular/platform-browser-dynamic',
27+
'@angular/router-deprecated'
28+
];
29+
30+
// add package entries for angular packages in the form
31+
// '@angular/common': { main: 'index.js', defaultExtension: 'js' }
32+
packageNames.forEach(function(pkgName) {
33+
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
34+
});
35+
36+
var config = {
37+
map: map,
38+
packages: packages
39+
}
40+
41+
System.config(config);
42+
43+
})(this);

APM - Final Updated/typings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"ambientDependencies": {
3-
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd" }
3+
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654"
4+
}
45
}

0 commit comments

Comments
 (0)