angular-docs-cn/public/docs/_examples/upgrade/ts/adapter/app/index-1-to-2-projection.html

33 lines
1.0 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<hero-app>
<!-- #docregion usecomponent -->
<div ng-controller="MainController as mainCtrl">
<hero-detail [hero]="mainCtrl.hero">
<!-- Everything here will get projected -->
<p>{{mainCtrl.hero.description}}</p>
</hero-detail>
</div>
<!-- #enddocregion usecomponent -->
</hero-app>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0-rc.0/angular.js"></script>
<script src="../node_modules/systemjs/dist/system.js"></script>
<script src="../node_modules/rxjs/bundles/Rx.js"></script>
<script src="../node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="../node_modules/angular2/bundles/upgrade.dev.js"></script>
<script>
System.config({
packages: {
'js': {defaultExtension: 'js'}
}
});
System.import('js/1-to-2-projection/app.module')
.catch(function(e) { console.error(e); });
</script>
</body>
</html>