Skip to content

Commit 44f101b

Browse files
committed
Missing files for demos so they work with breaking changes made in Angular 2.0.0-rc.0
1 parent bb5f909 commit 44f101b

File tree

3 files changed

+139
-3
lines changed

3 files changed

+139
-3
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ typings
1414
dist
1515
bundles
1616

17-
*.js
18-
*.js.map
19-
*.d.ts
17+
/*.js
18+
/*.js.map
19+
/*.d.ts
2020

2121
app/**/*.js
2222
app/**/*.js.map

demos/features/systemjs.config.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* PLUNKER VERSION (based on systemjs.config.js in angular.io)
3+
* System configuration for Angular 2 samples
4+
* Adjust as necessary for your application needs.
5+
* Override at the last minute with global.filterSystemConfig (as plunkers do)
6+
*/
7+
(function(global) {
8+
9+
var ngVer = '@2.0.0-rc.1'; // lock in the angular package version; do not let it float to current!
10+
11+
//map tells the System loader where to look for things
12+
var map = {
13+
'app': 'app', // 'dist',
14+
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6',
15+
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api' // get latest
16+
};
17+
18+
//packages tells the System loader how to load when no filename and/or no extension
19+
var packages = {
20+
'app': { main: 'main.ts', defaultExtension: 'ts' },
21+
'rxjs': { defaultExtension: 'js' },
22+
'angular2-in-memory-web-api': { defaultExtension: 'js' },
23+
};
24+
25+
var packageNames = [
26+
'@angular/common',
27+
'@angular/compiler',
28+
'@angular/core',
29+
'@angular/http',
30+
'@angular/platform-browser',
31+
'@angular/platform-browser-dynamic',
32+
'@angular/router',
33+
'@angular/router-deprecated',
34+
'@angular/upgrade',
35+
];
36+
37+
// add map entries for angular packages in the form '@angular/common': 'https://npmcdn.com/@angular/common@0.0.0-3?main=browser'
38+
packageNames.forEach(function(pkgName) {
39+
map[pkgName] = 'https://npmcdn.com/' + pkgName + ngVer;
40+
});
41+
42+
// add package entries for angular packages in the form '@angular/common': { main: 'index.js', defaultExtension: 'js' }
43+
packageNames.forEach(function(pkgName) {
44+
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
45+
});
46+
47+
var config = {
48+
transpiler: 'typescript',
49+
typescriptOptions: {
50+
emitDecoratorMetadata: true
51+
},
52+
map: map,
53+
packages: packages
54+
}
55+
56+
// filterSystemConfig - index.html's chance to modify config before we register it.
57+
if (global.filterSystemConfig) { global.filterSystemConfig(config); }
58+
59+
System.config(config);
60+
61+
})(this);
62+
63+
64+
/*
65+
Copyright 2016 Google Inc. All Rights Reserved.
66+
Use of this source code is governed by an MIT-style license that
67+
can be found in the LICENSE file at http://angular.io/license
68+
*/

demos/hello-world/systemjs.config.js

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* PLUNKER VERSION (based on systemjs.config.js in angular.io)
3+
* System configuration for Angular 2 samples
4+
* Adjust as necessary for your application needs.
5+
* Override at the last minute with global.filterSystemConfig (as plunkers do)
6+
*/
7+
(function(global) {
8+
9+
var ngVer = '@2.0.0-rc.1'; // lock in the angular package version; do not let it float to current!
10+
11+
//map tells the System loader where to look for things
12+
var map = {
13+
'app': 'app', // 'dist',
14+
'rxjs': 'https://npmcdn.com/rxjs@5.0.0-beta.6',
15+
'angular2-in-memory-web-api': 'https://npmcdn.com/angular2-in-memory-web-api' // get latest
16+
};
17+
18+
//packages tells the System loader how to load when no filename and/or no extension
19+
var packages = {
20+
'app': { main: 'main.ts', defaultExtension: 'ts' },
21+
'rxjs': { defaultExtension: 'js' },
22+
'angular2-in-memory-web-api': { defaultExtension: 'js' },
23+
};
24+
25+
var packageNames = [
26+
'@angular/common',
27+
'@angular/compiler',
28+
'@angular/core',
29+
'@angular/http',
30+
'@angular/platform-browser',
31+
'@angular/platform-browser-dynamic',
32+
'@angular/router',
33+
'@angular/router-deprecated',
34+
'@angular/upgrade',
35+
];
36+
37+
// add map entries for angular packages in the form '@angular/common': 'https://npmcdn.com/@angular/common@0.0.0-3?main=browser'
38+
packageNames.forEach(function(pkgName) {
39+
map[pkgName] = 'https://npmcdn.com/' + pkgName + ngVer;
40+
});
41+
42+
// add package entries for angular packages in the form '@angular/common': { main: 'index.js', defaultExtension: 'js' }
43+
packageNames.forEach(function(pkgName) {
44+
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
45+
});
46+
47+
var config = {
48+
transpiler: 'typescript',
49+
typescriptOptions: {
50+
emitDecoratorMetadata: true
51+
},
52+
map: map,
53+
packages: packages
54+
}
55+
56+
// filterSystemConfig - index.html's chance to modify config before we register it.
57+
if (global.filterSystemConfig) { global.filterSystemConfig(config); }
58+
59+
System.config(config);
60+
61+
})(this);
62+
63+
64+
/*
65+
Copyright 2016 Google Inc. All Rights Reserved.
66+
Use of this source code is governed by an MIT-style license that
67+
can be found in the LICENSE file at http://angular.io/license
68+
*/

0 commit comments

Comments
 (0)