Currently, core depends on the browser, which means that other platforms (e.g., NativeScript or webworker) cannot use the bootstrapping logic core provides. This PR extract makes bootstrapping logic in core completely platform-independent. The browser-specific code was moved to "angular2/platforms/browser". BREAKING CHANGE A few private helpers (e.g., platformCommon or applicationCommon) were removed or replaced with other helpers. Look at PLATFORM_COMMON_PROVIDERS, APPLICATION_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS to see if they export the providers you need. Closes #5219 Closes #5280
26 lines
923 B
HTML
26 lines
923 B
HTML
<script src="es6-shim.js"></script>
|
|
<script src="system.src.js"></script>
|
|
<script>
|
|
System.config({
|
|
baseURL: '/',
|
|
packages: {
|
|
'angular2_material': {defaultExtension: 'js'},
|
|
'benchmarks': {defaultExtension: 'js'},
|
|
'playground': {defaultExtension: 'js'},
|
|
// TODO(rado): These helpers don't end up in the bundle, thus they should
|
|
// not even be in src/*. Move them!
|
|
'angular2/src/testing/benchmark_util': {defaultExtension: 'js'},
|
|
'angular2/src/facade/browser': {defaultExtension: 'js'},
|
|
'angular2/bootstrap': {defaultExtension: 'js'},
|
|
}
|
|
});
|
|
</script>
|
|
<script src="/bundle/angular2.dev.js"></script>
|
|
<script src="/bundle/http.js"></script>
|
|
<script src="/bundle/router.dev.js"></script>
|
|
<script>
|
|
window.angularDevMode = true;
|
|
var filename = '@@PATH/@@FILENAME';
|
|
System.import(filename).then(function(m) { m.main(); }, console.error.bind(console));
|
|
</script>
|