demo for ng1 app hosting ng2 components

Simple project demonstrating ng2 component hosting within ng1-based
application (based on official angular-seed repo).
This commit is contained in:
Denys Vuika
2016-04-06 15:23:19 +01:00
parent f9e1ad80a9
commit f7e6ef55a2
49 changed files with 3228 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
/*
import {bootstrap} from 'angular2/platform/browser';
import {AppComponent} from './app.component';
bootstrap(AppComponent);
*/
System.register(['angular2/upgrade', './app.component', "./components/ng2/navbar.component"], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var upgrade_1, app_component_1, navbar_component_1;
var upgradeAdapter;
return {
setters:[
function (upgrade_1_1) {
upgrade_1 = upgrade_1_1;
},
function (app_component_1_1) {
app_component_1 = app_component_1_1;
},
function (navbar_component_1_1) {
navbar_component_1 = navbar_component_1_1;
}],
execute: function() {
upgradeAdapter = new upgrade_1.UpgradeAdapter();
angular.module('myApp')
.directive('myApp', upgradeAdapter.downgradeNg2Component(app_component_1.AppComponent))
.directive('appNavbar', upgradeAdapter.downgradeNg2Component(navbar_component_1.AppNavBar));
upgradeAdapter.bootstrap(document.body, ['myApp'], { strictDi: true });
}
}
});
//# sourceMappingURL=main.js.map