Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 07c6099

Browse files
Updated to Angular 2 v2.0.0
1 parent c955318 commit 07c6099

File tree

8 files changed

+113
-130
lines changed

8 files changed

+113
-130
lines changed

‎README.md‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,6 @@ The codebase was updated to handle the breaking changes on Angular2's Release Ca
215215
- Quickstart guide now follows the pattern in Angular 2's Quickstart to add the references to other libs in `systemjs.config.js`.
216216
However if you still want to do it the old way by adding the system bundle, you can still do so, except now its called `bundles/angular2-logger.sys.min.js`.
217217

218-
## Breaking changes on 0.3.0
219-
The codebase was updated to handle the breaking changes on Angular2's Release Candidate.
220-
221-
**Make sure you don't upgrade to this version if you haven't upgraded Angular2 to at least `2.0.0-rc.0`**
222-
223-
## Breaking changes on 0.2.0
224-
The setup changed a bit to make it easier so make sure you follow up the new Quickstart.
225-
226218
## LICENSE
227219

228220
[MIT](https://opensource.org/licenses/MIT)

‎demos/features/app/main.ts‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import {bootstrap} from '@angular/platform-browser-dynamic';
2-
import {LoggerAppComponent} from "./logger-app.component";
3-
import {Logger} from "angular2-logger/core";
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
42

5-
bootstrap( LoggerAppComponent,[ Logger ]);
3+
import { AppModule } from './app.module';
4+
5+
const platform = platformBrowserDynamic();
6+
platform.bootstrapModule( AppModule );

‎demos/features/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- 1. Load libraries -->
1010
<!-- Polyfill(s) for older browsers -->
1111
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
12-
<script src="https://npmcdn.com/zone.js@0.6.12?main=browser"></script>
12+
<script src="https://npmcdn.com/zone.js@0.6.23?main=browser"></script>
1313
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></script>
1414
<script src="https://npmcdn.com/systemjs@0.19.27/dist/system.src.js"></script>
1515

‎demos/features/systemjs.config.js‎

Lines changed: 44 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,54 @@
22
* System configuration for Angular 2 samples
33
* Adjust as necessary for your application needs.
44
*/
5-
(function(global) {
6-
7-
var ngVer = '@2.0.0-rc.5'; // lock in the angular package version; do not let it float to current!
8-
9-
//map tells the System loader where to look for things
10-
var map = {
11-
'app': 'app',
12-
'@angular': 'https://npmcdn.com/@angular',
13-
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api', // get latest
14-
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6',
15-
16-
'ts': 'https://npmcdn.com/plugin-typescript@4.0.10/lib/plugin.js',
17-
'typescript': 'https://npmcdn.com/typescript@1.8.0/lib/typescript.js',
18-
'angular2-logger': '../../',
19-
};
20-
21-
//packages tells the System loader how to load when no filename and/or no extension
22-
var packages = {
23-
'app': { main: 'main.ts', defaultExtension: 'ts' },
24-
'rxjs': { defaultExtension: 'js' },
25-
'angular2-in-memory-web-api': { defaultExtension: 'js' },
26-
'angular2-logger': { defaultExtension: 'js' },
27-
};
28-
29-
var ngPackageNames = [
30-
'common',
31-
'compiler',
32-
'core',
33-
'platform-browser',
34-
'platform-browser-dynamic',
35-
];
36-
37-
// Add map entries for each angular package
38-
// only because we're pinning the version with `ngVer`.
39-
ngPackageNames.forEach(function(pkgName) {
40-
map['@angular/'+pkgName] = 'https://npmcdn.com/@angular/' + pkgName + ngVer;
41-
});
42-
43-
// Add package entries for angular packages
44-
ngPackageNames.forEach(function(pkgName) {
45-
// Bundled (~40 requests):
46-
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
47-
});
48-
49-
var config = {
5+
(function (global) {
6+
System.config({
507
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
518
transpiler: 'typescript',
529
typescriptOptions: {
5310
emitDecoratorMetadata: true,
5411
experimentalDecorators: true
5512
},
56-
map: map,
57-
packages: packages
58-
};
59-
60-
System.config(config);
61-
13+
paths: {
14+
// paths serve as alias
15+
// 'npm:': '../../node_modules'
16+
},
17+
// map tells the System loader where to look for things
18+
map: {
19+
'typescript': 'https://npmcdn.com/typescript@1.8.0/lib/typescript.js',
20+
21+
// our app is within the app folder
22+
app: 'app',
23+
// angular bundles
24+
'@angular/core': 'https://npmcdn.com/@angular/core/bundles/core.umd.js',
25+
'@angular/common': 'https://npmcdn.com/@angular/common/bundles/common.umd.js',
26+
'@angular/compiler': 'https://npmcdn.com/@angular/compiler/bundles/compiler.umd.js',
27+
'@angular/platform-browser': 'https://npmcdn.com/@angular/platform-browser/bundles/platform-browser.umd.js',
28+
'@angular/platform-browser-dynamic': 'https://npmcdn.com/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
29+
'@angular/http': 'https://npmcdn.com/@angular/http/bundles/http.umd.js',
30+
'@angular/router': 'https://npmcdn.com/@angular/router/bundles/router.umd.js',
31+
'@angular/forms': 'https://npmcdn.com/@angular/forms/bundles/forms.umd.js',
32+
// other libraries
33+
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.12',
34+
'angular2-logger': '../../',
35+
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api',
36+
},
37+
// packages tells the System loader how to load when no filename and/or no extension
38+
packages: {
39+
app: {
40+
main: './main',
41+
defaultExtension: 'ts'
42+
},
43+
rxjs: {
44+
defaultExtension: 'js'
45+
},
46+
'angular2-logger': {
47+
defaultExtension: 'js'
48+
},
49+
'angular2-in-memory-web-api': {
50+
main: './index.js',
51+
defaultExtension: 'js'
52+
}
53+
}
54+
});
6255
})(this);

‎demos/hello-world/app/main.ts‎

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

33
import { AppModule } from './app.module';
44

5-
platformBrowserDynamic().bootstrapModule( AppModule );
5+
const platform = platformBrowserDynamic();
6+
platform.bootstrapModule( AppModule );

‎demos/hello-world/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- 1. Load libraries -->
1010
<!-- Polyfill(s) for older browsers -->
1111
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script>
12-
<script src="https://npmcdn.com/zone.js@0.6.12?main=browser"></script>
12+
<script src="https://npmcdn.com/zone.js@0.6.23?main=browser"></script>
1313
<script src="https://npmcdn.com/reflect-metadata@0.1.3"></script>
1414
<script src="https://npmcdn.com/systemjs@0.19.27/dist/system.src.js"></script>
1515

‎demos/hello-world/systemjs.config.js‎

Lines changed: 44 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,54 @@
22
* System configuration for Angular 2 samples
33
* Adjust as necessary for your application needs.
44
*/
5-
(function(global) {
6-
7-
var ngVer = '@2.0.0-rc.5'; // lock in the angular package version; do not let it float to current!
8-
9-
//map tells the System loader where to look for things
10-
var map = {
11-
'app': 'app',
12-
'@angular': 'https://npmcdn.com/@angular',
13-
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api', // get latest
14-
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6',
15-
16-
'typescript': 'https://npmcdn.com/typescript@1.8.0/lib/typescript.js',
17-
'angular2-logger': '../../',
18-
};
19-
20-
//packages tells the System loader how to load when no filename and/or no extension
21-
var packages = {
22-
'app': { main: 'main.ts', defaultExtension: 'ts' },
23-
'rxjs': { defaultExtension: 'js' },
24-
'angular2-in-memory-web-api': { defaultExtension: 'js' },
25-
'angular2-logger': { defaultExtension: 'js' },
26-
};
27-
28-
var ngPackageNames = [
29-
'common',
30-
'compiler',
31-
'core',
32-
'platform-browser',
33-
'platform-browser-dynamic',
34-
];
35-
36-
// Add map entries for each angular package
37-
// only because we're pinning the version with `ngVer`.
38-
ngPackageNames.forEach(function(pkgName) {
39-
map['@angular/'+pkgName] = 'https://npmcdn.com/@angular/' + pkgName + ngVer;
40-
});
41-
42-
// Add package entries for angular packages
43-
ngPackageNames.forEach(function(pkgName) {
44-
// Bundled (~40 requests):
45-
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
46-
});
47-
48-
var config = {
5+
(function (global) {
6+
System.config({
497
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
508
transpiler: 'typescript',
519
typescriptOptions: {
5210
emitDecoratorMetadata: true,
5311
experimentalDecorators: true
5412
},
55-
map: map,
56-
packages: packages
57-
};
58-
59-
System.config(config);
60-
13+
paths: {
14+
// paths serve as alias
15+
// 'npm:': '../../node_modules'
16+
},
17+
// map tells the System loader where to look for things
18+
map: {
19+
'typescript': 'https://npmcdn.com/typescript@1.8.0/lib/typescript.js',
20+
21+
// our app is within the app folder
22+
app: 'app',
23+
// angular bundles
24+
'@angular/core': 'https://npmcdn.com/@angular/core/bundles/core.umd.js',
25+
'@angular/common': 'https://npmcdn.com/@angular/common/bundles/common.umd.js',
26+
'@angular/compiler': 'https://npmcdn.com/@angular/compiler/bundles/compiler.umd.js',
27+
'@angular/platform-browser': 'https://npmcdn.com/@angular/platform-browser/bundles/platform-browser.umd.js',
28+
'@angular/platform-browser-dynamic': 'https://npmcdn.com/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
29+
'@angular/http': 'https://npmcdn.com/@angular/http/bundles/http.umd.js',
30+
'@angular/router': 'https://npmcdn.com/@angular/router/bundles/router.umd.js',
31+
'@angular/forms': 'https://npmcdn.com/@angular/forms/bundles/forms.umd.js',
32+
// other libraries
33+
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.12',
34+
'angular2-logger': '../../',
35+
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api',
36+
},
37+
// packages tells the System loader how to load when no filename and/or no extension
38+
packages: {
39+
app: {
40+
main: './main',
41+
defaultExtension: 'ts'
42+
},
43+
rxjs: {
44+
defaultExtension: 'js'
45+
},
46+
'angular2-logger': {
47+
defaultExtension: 'js'
48+
},
49+
'angular2-in-memory-web-api': {
50+
main: './index.js',
51+
defaultExtension: 'js'
52+
}
53+
}
54+
});
6155
})(this);

‎package.json‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,25 @@
7676
"typescript": "1.8.10",
7777
"typings": "^1.0.3",
7878
"uglify-js": "^2.6.2",
79-
"@angular/common": "2.0.0-rc.5",
80-
"@angular/compiler": "2.0.0-rc.5",
81-
"@angular/core": "2.0.0-rc.5",
82-
"@angular/platform-browser": "2.0.0-rc.5",
83-
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
84-
"systemjs": "0.19.37",
85-
"core-js": "^2.4.0",
79+
80+
"@angular/common": "2.0.0",
81+
"@angular/compiler": "2.0.0",
82+
"@angular/core": "2.0.0",
83+
"@angular/platform-browser": "2.0.0",
84+
"@angular/platform-browser-dynamic": "2.0.0",
85+
86+
"core-js": "^2.4.1",
8687
"reflect-metadata": "^0.1.3",
87-
"rxjs": "5.0.0-beta.6",
88-
"zone.js": "^0.6.12"
88+
"rxjs": "5.0.0-beta.12",
89+
"systemjs": "0.19.27",
90+
"zone.js": "^0.6.23"
8991
},
9092
"peerDependencies": {
91-
"@angular/common": "2.0.0-rc.5",
92-
"@angular/compiler": "2.0.0-rc.5",
93-
"@angular/core": "2.0.0-rc.5",
94-
"@angular/platform-browser": "2.0.0-rc.5",
95-
"@angular/platform-browser-dynamic": "2.0.0-rc.5"
93+
"@angular/common": "2.0.0",
94+
"@angular/compiler": "2.0.0",
95+
"@angular/core": "2.0.0",
96+
"@angular/platform-browser": "2.0.0",
97+
"@angular/platform-browser-dynamic": "2.0.0"
9698
},
9799
"main": "core.js"
98100
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /