build(aio): change examples to CLI (#19248)

PR Close #19248
This commit is contained in:
Jesus Rodriguez
2017-08-22 21:31:15 +02:00
committed by Igor Minar
parent 344a5ca545
commit 9bbf009dff
377 changed files with 2339 additions and 1748 deletions

View File

@ -1,7 +1,7 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-app-ctor',
selector: 'app-ctor',
template: `
<h1>{{title}} [Ctor version]</h1>
<h2>My favorite hero is: {{myHero}}</h2>

View File

@ -2,7 +2,7 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
selector: 'app-root',
// #docregion template
template: `
<h1>{{title}}</h1>

View File

@ -2,7 +2,7 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
selector: 'app-root',
// #docregion template
template: `
<h1>{{title}}</h1>

View File

@ -6,7 +6,7 @@ import { Hero } from './hero';
// #enddocregion import
@Component({
selector: 'my-app',
selector: 'app-root',
// #docregion template
template: `
<h1>{{title}}</h1>

View File

@ -5,7 +5,7 @@ import { Component } from '@angular/core';
import { Hero } from './hero';
@Component({
selector: 'my-app',
selector: 'app-root',
template: `
<h1>{{title}}</h1>
<h2>My favorite hero is: {{myHero.name}}</h2>

View File

@ -1,27 +1,15 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Displaying Data</title>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
<!-- Polyfills -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('main.js').catch(function(err){ console.error(err); });
</script>
</head>
<!-- #docregion body -->
<body>
<my-app>loading...</my-app>
<app-root></app-root>
</body>
<!-- #enddocregion body -->

View File

@ -1,6 +1,12 @@
// #docregion
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule);