chore: update to rc.0
This commit is contained in:
parent
49908bb1b4
commit
3d5302adce
@ -77,6 +77,7 @@ var _exampleBoilerplateFiles = [
|
|||||||
'karma-test-shim.js',
|
'karma-test-shim.js',
|
||||||
'package.json',
|
'package.json',
|
||||||
'styles.css',
|
'styles.css',
|
||||||
|
'systemjs.config.js',
|
||||||
'tsconfig.json',
|
'tsconfig.json',
|
||||||
'tslint.json',
|
'tslint.json',
|
||||||
'typings.json',
|
'typings.json',
|
||||||
|
5
public/docs/_examples/.gitignore
vendored
5
public/docs/_examples/.gitignore
vendored
@ -15,7 +15,12 @@ tslint.json
|
|||||||
wallaby.js
|
wallaby.js
|
||||||
npm-debug*.
|
npm-debug*.
|
||||||
protractor.config.js
|
protractor.config.js
|
||||||
|
systemjs.config.js
|
||||||
_test-output
|
_test-output
|
||||||
_temp
|
_temp
|
||||||
|
**/ts/**/*.js
|
||||||
|
**/ts-snippets/**/*.js
|
||||||
|
**/ts/**/*.d.ts
|
||||||
|
|
||||||
!**/*e2e-spec.js
|
!**/*e2e-spec.js
|
||||||
|
!systemjs.config.1.js
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion import
|
// #docregion import
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
// #enddocregion import
|
// #enddocregion import
|
||||||
import {HeroListComponent} from './hero-list.component';
|
import {HeroListComponent} from './hero-list.component';
|
||||||
import {SalesTaxComponent} from './sales-tax.component';
|
import {SalesTaxComponent} from './sales-tax.component';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Injectable, Type} from 'angular2/core';
|
import {Injectable, Type} from '@angular/core';
|
||||||
import {Logger} from './logger.service';
|
import {Logger} from './logger.service';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
import {Component, OnInit} from 'angular2/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroDetailComponent} from './hero-detail.component';
|
import {HeroDetailComponent} from './hero-detail.component';
|
||||||
import {HeroService} from './hero.service';
|
import {HeroService} from './hero.service';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {BackendService} from './backend.service';
|
import {BackendService} from './backend.service';
|
||||||
import {Logger} from './logger.service';
|
import {Logger} from './logger.service';
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
let nextId = 1;
|
||||||
|
|
||||||
export class Hero {
|
export class Hero {
|
||||||
id:number
|
id: number;
|
||||||
constructor(
|
constructor(
|
||||||
public name: string,
|
public name: string,
|
||||||
public power?: string) {
|
public power?: string) {
|
||||||
this.id = nextId++;
|
this.id = nextId++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var nextId = 1;
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
// #docregion class
|
// #docregion class
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
// #docregion import
|
// #docregion import
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
// #enddocregion import
|
// #enddocregion import
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {SalesTaxService} from './sales-tax.service';
|
import {SalesTaxService} from './sales-tax.service';
|
||||||
import {TaxRateService} from './tax-rate.service';
|
import {TaxRateService} from './tax-rate.service';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable, Inject} from 'angular2/core';
|
import {Injectable, Inject} from '@angular/core';
|
||||||
import {TaxRateService} from './tax-rate.service';
|
import {TaxRateService} from './tax-rate.service';
|
||||||
|
|
||||||
// #docregion class
|
// #docregion class
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
|
|
||||||
// #docregion class
|
// #docregion class
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -1,30 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Intro to Angular 2</title>
|
<title>Architecture of Angular 2</title>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {HighlightDirective} from './highlight.directive';
|
import {HighlightDirective} from './highlight.directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Directive, ElementRef, Input} from 'angular2/core';
|
import {Directive, ElementRef, Input} from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[myHighlight]'
|
selector: '[myHighlight]'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Directive, ElementRef, Input} from 'angular2/core';
|
import {Directive, ElementRef, Input} from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[myHighlight]',
|
selector: '[myHighlight]',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion full
|
// #docregion full
|
||||||
import {Directive, ElementRef, Input} from 'angular2/core';
|
import {Directive, ElementRef, Input} from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[myHighlight]',
|
selector: '[myHighlight]',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
|
|
||||||
bootstrap(AppComponent);
|
bootstrap(AppComponent);
|
||||||
|
@ -2,33 +2,25 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Attribute Directives</title>
|
<title>Attribute Directives</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<my-app>loading...</my-app>
|
<my-app>loading...</my-app>
|
||||||
</body>
|
</body>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,5 +1,5 @@
|
|||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from "angular2/router";
|
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from '@angular/router-deprecated';
|
||||||
|
|
||||||
import {MovieListComponent} from './movie-list.component';
|
import {MovieListComponent} from './movie-list.component';
|
||||||
import {MovieService} from './movie.service';
|
import {MovieService} from './movie.service';
|
||||||
@ -19,7 +19,7 @@ import {StringSafeDatePipe} from './date.pipe';
|
|||||||
])
|
])
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
angularDocsUrl = "https://angular.io/";
|
angularDocsUrl = 'https://angular.io/';
|
||||||
colorPreference = 'red';
|
colorPreference = 'red';
|
||||||
eventType = '<not clicked yet>';
|
eventType = '<not clicked yet>';
|
||||||
isActive = true;
|
isActive = true;
|
||||||
@ -27,7 +27,7 @@ export class AppComponent {
|
|||||||
movie: IMovie = null;
|
movie: IMovie = null;
|
||||||
movies: IMovie[] = [];
|
movies: IMovie[] = [];
|
||||||
showImage = true;
|
showImage = true;
|
||||||
title: string = "A1-A2 Quick Ref Cookbook";
|
title: string = 'A1-A2 Quick Ref Cookbook';
|
||||||
toggleImage(event: UIEvent) {
|
toggleImage(event: UIEvent) {
|
||||||
this.showImage = !this.showImage;
|
this.showImage = !this.showImage;
|
||||||
this.eventType = (event && event.type) || 'not provided';
|
this.eventType = (event && event.type) || 'not provided';
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import {Injectable, Pipe} from 'angular2/core';
|
import {Injectable, Pipe} from '@angular/core';
|
||||||
import {DatePipe} from 'angular2/common';
|
import {DatePipe} from '@angular/common';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
// #docregion date-pipe
|
// #docregion date-pipe
|
||||||
@Pipe({name: 'date', pure: true})
|
@Pipe({name: 'date', pure: true})
|
||||||
export class StringSafeDatePipe extends DatePipe {
|
export class StringSafeDatePipe extends DatePipe {
|
||||||
transform(value: any, args: string): string {
|
transform(value: any, format: string): string {
|
||||||
value = typeof value === 'string' ?
|
value = typeof value === 'string' ?
|
||||||
Date.parse(value) : value
|
Date.parse(value) : value;
|
||||||
return super.transform(value, args);
|
return super.transform(value, format);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #enddocregion date-pipe
|
// #enddocregion date-pipe
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
|
|
||||||
bootstrap(AppComponent);
|
bootstrap(AppComponent);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion import
|
// #docregion import
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {ROUTER_DIRECTIVES} from "angular2/router";
|
import {ROUTER_DIRECTIVES} from '@angular/router-deprecated';
|
||||||
// #enddocregion import
|
// #enddocregion import
|
||||||
import {MovieService} from './movie.service';
|
import {MovieService} from './movie.service';
|
||||||
import {IMovie} from './movie';
|
import {IMovie} from './movie';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {IMovie} from './movie';
|
import {IMovie} from './movie';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -6,34 +6,34 @@ export class MovieService {
|
|||||||
getMovies(): IMovie[] {
|
getMovies(): IMovie[] {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
hero: "Celeritas",
|
hero: 'Celeritas',
|
||||||
imageurl: "images/hero.png",
|
imageurl: 'images/hero.png',
|
||||||
movieId: 1,
|
movieId: 1,
|
||||||
mpaa: "pg-13",
|
mpaa: 'pg-13',
|
||||||
releaseDate: "2015-12-19T00:00:00",
|
releaseDate: '2015-12-19T00:00:00',
|
||||||
title: "Celeritas Reigns",
|
title: 'Celeritas Reigns',
|
||||||
price: 12.95,
|
price: 12.95,
|
||||||
starRating: 4.925,
|
starRating: 4.925,
|
||||||
approvalRating: .97
|
approvalRating: .97
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: "Mr. Nice",
|
hero: 'Mr. Nice',
|
||||||
imageurl: "images/villain.png",
|
imageurl: 'images/villain.png',
|
||||||
movieId: 2,
|
movieId: 2,
|
||||||
mpaa: "pg-13",
|
mpaa: 'pg-13',
|
||||||
releaseDate: "2015-12-18T00:00:00",
|
releaseDate: '2015-12-18T00:00:00',
|
||||||
title: "No More Mr. Nice Guy",
|
title: 'No More Mr. Nice Guy',
|
||||||
price: 14.95,
|
price: 14.95,
|
||||||
starRating: 4.6,
|
starRating: 4.6,
|
||||||
approvalRating: .94
|
approvalRating: .94
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: "Angular",
|
hero: 'Angular',
|
||||||
imageurl: "images/ng-logo.png",
|
imageurl: 'images/ng-logo.png',
|
||||||
movieId: 3,
|
movieId: 3,
|
||||||
mpaa: "pg-13",
|
mpaa: 'pg-13',
|
||||||
releaseDate: "2015-12-17T00:00:00",
|
releaseDate: '2015-12-17T00:00:00',
|
||||||
title: "Angular to the Rescue",
|
title: 'Angular to the Rescue',
|
||||||
price: 15.95,
|
price: 15.95,
|
||||||
starRating: 4.98,
|
starRating: 4.98,
|
||||||
approvalRating: .9995
|
approvalRating: .9995
|
||||||
|
@ -2,33 +2,23 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Angular 1 to Angular 2 Quick Reference</title>
|
<title>Angular 1 to Angular 2 Quick Reference</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<!-- #docregion style -->
|
<!-- #docregion style -->
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
<!-- #enddocregion style -->
|
<!-- #enddocregion style -->
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {HeroParentComponent} from './hero-parent.component';
|
import {HeroParentComponent} from './hero-parent.component';
|
||||||
import {NameParentComponent} from './name-parent.component';
|
import {NameParentComponent} from './name-parent.component';
|
||||||
import {VersionParentComponent} from './version-parent.component';
|
import {VersionParentComponent} from './version-parent.component';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input, OnDestroy} from 'angular2/core';
|
import {Component, Input, OnDestroy} from '@angular/core';
|
||||||
import {MissionService} from './mission.service';
|
import {MissionService} from './mission.service';
|
||||||
import {Subscription} from 'rxjs/Subscription';
|
import {Subscription} from 'rxjs/Subscription';
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion vc
|
// #docregion vc
|
||||||
import {AfterViewInit, ViewChild} from 'angular2/core';
|
import {AfterViewInit, ViewChild} from '@angular/core';
|
||||||
// #docregion lv
|
// #docregion lv
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {CountdownTimerComponent} from './countdown-timer.component';
|
import {CountdownTimerComponent} from './countdown-timer.component';
|
||||||
|
|
||||||
// #enddocregion lv
|
// #enddocregion lv
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, OnInit, OnDestroy} from 'angular2/core';
|
import {Component, OnInit, OnDestroy} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector:'countdown-timer',
|
selector:'countdown-timer',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {HeroChildComponent} from './hero-child.component';
|
import {HeroChildComponent} from './hero-child.component';
|
||||||
import {HEROES} from './hero';
|
import {HEROES} from './hero';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
|
|
||||||
bootstrap(AppComponent);
|
bootstrap(AppComponent);
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core'
|
import {Injectable} from '@angular/core'
|
||||||
import {Subject} from 'rxjs/Subject';
|
import {Subject} from 'rxjs/Subject';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {AstronautComponent} from './astronaut.component';
|
import {AstronautComponent} from './astronaut.component';
|
||||||
import {MissionService} from './mission.service';
|
import {MissionService} from './mission.service';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'name-child',
|
selector: 'name-child',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {NameChildComponent} from './name-child.component';
|
import {NameChildComponent} from './name-child.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* tslint:disable:forin */
|
/* tslint:disable:forin */
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input, OnChanges, SimpleChange} from 'angular2/core';
|
import {Component, Input, OnChanges, SimpleChange} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'version-child',
|
selector: 'version-child',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {VersionChildComponent} from './version-child.component';
|
import {VersionChildComponent} from './version-child.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, EventEmitter, Input, Output} from 'angular2/core';
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-voter',
|
selector: 'my-voter',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {VoterComponent} from './voter.component';
|
import {VoterComponent} from './voter.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Passing information from parent to child</title>
|
<title>Passing information from parent to child</title>
|
||||||
<style>
|
<style>
|
||||||
.to-top {margin-top: 8px; display: block;}
|
.to-top {margin-top: 8px; display: block;}
|
||||||
@ -9,26 +9,16 @@
|
|||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
<link rel="stylesheet" href="demo.css">
|
<link rel="stylesheet" href="demo.css">
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from 'angular2/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { HeroBiosComponent,
|
import { HeroBiosComponent,
|
||||||
HeroBiosAndContactsComponent} from './hero-bios.component';
|
HeroBiosAndContactsComponent} from './hero-bios.component';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* tslint:disable:one-line:check-open-brace*/
|
/* tslint:disable:one-line:check-open-brace*/
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Injectable } from 'angular2/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { LoggerService } from './logger.service';
|
import { LoggerService } from './logger.service';
|
||||||
|
|
||||||
// #docregion minimal-logger
|
// #docregion minimal-logger
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input, OnInit} from 'angular2/core';
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
|
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroCacheService} from './hero-cache.service';
|
import {HeroCacheService} from './hero-cache.service';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component} from 'angular2/core';
|
import { Component} from '@angular/core';
|
||||||
|
|
||||||
import { HeroContactComponent } from './hero-contact.component';
|
import { HeroContactComponent } from './hero-contact.component';
|
||||||
import { HeroBioComponent } from './hero-bio.component';
|
import { HeroBioComponent } from './hero-bio.component';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroService} from './hero.service';
|
import {HeroService} from './hero.service';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Component, ElementRef, Host, Inject, Optional} from 'angular2/core';
|
import {Component, ElementRef, Host, Inject, Optional} from '@angular/core';
|
||||||
import {HeroCacheService} from './hero-cache.service';
|
import {HeroCacheService} from './hero-cache.service';
|
||||||
import {LoggerService} from './logger.service';
|
import {LoggerService} from './logger.service';
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
/* tslint:disable:one-line:check-open-brace*/
|
/* tslint:disable:one-line:check-open-brace*/
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion opaque-token
|
// #docregion opaque-token
|
||||||
import {OpaqueToken} from 'angular2/core';
|
import {OpaqueToken} from '@angular/core';
|
||||||
|
|
||||||
export const TITLE = new OpaqueToken('title');
|
export const TITLE = new OpaqueToken('title');
|
||||||
// #enddocregion opaque-token
|
// #enddocregion opaque-token
|
||||||
|
|
||||||
// #docregion hero-of-the-month
|
// #docregion hero-of-the-month
|
||||||
import { Component, Inject, provide } from 'angular2/core';
|
import { Component, Inject, provide } from '@angular/core';
|
||||||
|
|
||||||
import { DateLoggerService,
|
import { DateLoggerService,
|
||||||
MinimalLogger } from './date-logger.service';
|
MinimalLogger } from './date-logger.service';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Directive, ElementRef, Input} from 'angular2/core';
|
import {Directive, ElementRef, Input} from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[myHighlight]',
|
selector: '[myHighlight]',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class LoggerService {
|
export class LoggerService {
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { bootstrap } from 'angular2/platform/browser';
|
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||||
import { provide } from 'angular2/core';
|
import { provide } from '@angular/core';
|
||||||
import { XHRBackend } from 'angular2/http';
|
import { XHRBackend } from '@angular/http';
|
||||||
|
|
||||||
import { ROUTER_PROVIDERS } from 'angular2/router';
|
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
|
||||||
|
|
||||||
import { LocationStrategy,
|
import { LocationStrategy,
|
||||||
HashLocationStrategy } from 'angular2/platform/common';
|
HashLocationStrategy } from '@angular/common';
|
||||||
|
|
||||||
import { HeroData } from './hero-data';
|
import { HeroData } from './hero-data';
|
||||||
import { InMemoryBackendService,
|
import { InMemoryBackendService,
|
||||||
SEED_DATA } from 'a2-in-memory-web-api/core';
|
SEED_DATA } from 'angular2-in-memory-web-api/core';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/* tslint:disable:one-line:check-open-brace*/
|
/* tslint:disable:one-line:check-open-brace*/
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, forwardRef, Optional, provide, SkipSelf } from 'angular2/core';
|
import { Component, forwardRef, Optional, provide, SkipSelf } from '@angular/core';
|
||||||
|
|
||||||
// A component base class (see AlexComponent)
|
// A component base class (see AlexComponent)
|
||||||
export abstract class Base { name = 'Count Basie'; }
|
export abstract class Base { name = 'Count Basie'; }
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {OpaqueToken} from 'angular2/core';
|
import {OpaqueToken} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroService} from './hero.service';
|
import {HeroService} from './hero.service';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Component, OnInit} from 'angular2/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroService} from './hero.service';
|
import {HeroService} from './hero.service';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {LoggerService} from './logger.service';
|
import {LoggerService} from './logger.service';
|
||||||
import {UserService} from './user.service';
|
import {UserService} from './user.service';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UserService {
|
export class UserService {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Dependency Injection</title>
|
<title>Dependency Injection</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<!-- #docregion style -->
|
<!-- #docregion style -->
|
||||||
@ -9,31 +10,16 @@
|
|||||||
<link rel="stylesheet" href="sample.css">
|
<link rel="stylesheet" href="sample.css">
|
||||||
<!-- #enddocregion style -->
|
<!-- #enddocregion style -->
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
|
||||||
|
|
||||||
<!-- Additional modules: router, http, in-mem-web-api -->
|
<script src="systemjs.config.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/http.dev.js"></script>
|
|
||||||
<script src="node_modules/a2-in-memory-web-api/web-api.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component} from 'angular2/core'
|
import {Component} from '@angular/core'
|
||||||
import {DynamicForm} from './dynamic-form.component';
|
import {DynamicForm} from './dynamic-form.component';
|
||||||
import {QuestionService} from './question.service';
|
import {QuestionService} from './question.service';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {ControlGroup} from 'angular2/common';
|
import {ControlGroup} from '@angular/common';
|
||||||
import {QuestionBase} from './question-base';
|
import {QuestionBase} from './question-base';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Component, Input, OnInit} from 'angular2/core';
|
import {Component, Input, OnInit} from '@angular/core';
|
||||||
import {ControlGroup} from 'angular2/common';
|
import {ControlGroup} from '@angular/common';
|
||||||
|
|
||||||
import {QuestionBase} from './question-base';
|
import {QuestionBase} from './question-base';
|
||||||
import {QuestionControlService} from './question-control.service';
|
import {QuestionControlService} from './question-control.service';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
|
|
||||||
bootstrap(AppComponent, [])
|
bootstrap(AppComponent, [])
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {ControlGroup, FormBuilder, Validators} from 'angular2/common';
|
import {ControlGroup, FormBuilder, Validators} from '@angular/common';
|
||||||
import {QuestionBase} from './question-base';
|
import {QuestionBase} from './question-base';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
import {QuestionBase} from './question-base';
|
import {QuestionBase} from './question-base';
|
||||||
import {DynamicForm} from './dynamic-form.component';
|
import {DynamicForm} from './dynamic-form.component';
|
||||||
import {TextboxQuestion} from './question-textbox';
|
import {TextboxQuestion} from './question-textbox';
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<title>Dynamic Form</title>
|
<title>Dynamic Form</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@ -9,29 +10,18 @@
|
|||||||
<link rel="stylesheet" href="sample.css">
|
<link rel="stylesheet" href="sample.css">
|
||||||
<!-- #enddocregion style -->
|
<!-- #enddocregion style -->
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<my-app>Loading app...</my-app>
|
<my-app>Loading app...</my-app>
|
||||||
</body>
|
</body>
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
**/*.js
|
|
||||||
npm-debug.log
|
|
@ -1,8 +1,8 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
// Import the native Angular services.
|
// Import the native Angular services.
|
||||||
import { Component } from 'angular2/core';
|
import { Component } from '@angular/core';
|
||||||
import { Title } from 'angular2/platform/browser';
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { bootstrap } from 'angular2/platform/browser';
|
import { bootstrap } from '@angular/platform-browser-dynamic';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
// While Angular supplies a Title service for setting the HTML document title
|
// While Angular supplies a Title service for setting the HTML document title
|
||||||
@ -7,7 +7,7 @@ import { AppComponent } from './app.component';
|
|||||||
// As such, if we want to inject it into the components within our application,
|
// As such, if we want to inject it into the components within our application,
|
||||||
// we have to explicitly provide the Angular service in our top component.
|
// we have to explicitly provide the Angular service in our top component.
|
||||||
// #docregion bootstrap-title
|
// #docregion bootstrap-title
|
||||||
import { Title } from 'angular2/platform/browser';
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
bootstrap(AppComponent, [ Title ])
|
bootstrap(AppComponent, [ Title ])
|
||||||
// #enddocregion bootstrap-title
|
// #enddocregion bootstrap-title
|
||||||
|
@ -14,39 +14,18 @@
|
|||||||
<link rel="stylesheet" type="text/css" href="sample.css">
|
<link rel="stylesheet" type="text/css" href="sample.css">
|
||||||
<!-- #enddocregion style -->
|
<!-- #enddocregion style -->
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// Configure our module loader.
|
System.import('app')
|
||||||
System.config({
|
.then(function() { console.info( "System.js loaded your application module." )})
|
||||||
packages: {
|
.catch(function(err){ console.error(err); });
|
||||||
app: {
|
|
||||||
format: "register",
|
|
||||||
defaultExtension: "js"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Load the root module (which will, in turn, bootstrap the Angular 2 application).
|
|
||||||
System
|
|
||||||
.import( "app/main" )
|
|
||||||
.then(
|
|
||||||
function handleSuccess() {
|
|
||||||
console.info( "System.js loaded your application module." );
|
|
||||||
},
|
|
||||||
function handleError( error ) {
|
|
||||||
console.warn( "System.js could not load your application module." );
|
|
||||||
console.error( error );
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -55,9 +34,7 @@
|
|||||||
Setting The Document Title Using The Title Service
|
Setting The Document Title Using The Title Service
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<my-app>
|
<my-app>Loading app...</my-app>
|
||||||
Loading app...
|
|
||||||
</my-app>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
var AppComponent = ng.core.Component({
|
var AppComponent = ng.core.Component({
|
||||||
selector: 'heroes-queries',
|
selector: 'heroes-queries',
|
||||||
template:
|
template:
|
||||||
'<hero *ngFor="#hero of heroData"' +
|
'<hero *ngFor="let hero of heroData"' +
|
||||||
'[hero]="hero">' +
|
'[hero]="hero">' +
|
||||||
'<active-label></active-label>' +
|
'<active-label></active-label>' +
|
||||||
'</hero>' +
|
'</hero>' +
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
var provide =
|
var provide =
|
||||||
ng.core.provide;
|
ng.core.provide;
|
||||||
var bootstrap =
|
var bootstrap =
|
||||||
ng.platform.browser.bootstrap;
|
ng.platformBrowserDynamic.bootstrap;
|
||||||
var LocationStrategy =
|
var LocationStrategy =
|
||||||
ng.router.LocationStrategy;
|
ng.common.LocationStrategy;
|
||||||
var HashLocationStrategy =
|
var HashLocationStrategy =
|
||||||
ng.router.HashLocationStrategy;
|
ng.common.HashLocationStrategy;
|
||||||
// #enddocregion ng2import
|
// #enddocregion ng2import
|
||||||
|
|
||||||
// #docregion appimport
|
// #docregion appimport
|
||||||
|
@ -5,14 +5,19 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
|
|
||||||
<script src="node_modules/rxjs/bundles/Rx.umd.js"></script>
|
<script src="node_modules/rxjs/bundles/Rx.umd.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/angular2-all.umd.dev.js"></script>
|
<script src="node_modules/@angular/core/core.umd.js"></script>
|
||||||
|
<script src="node_modules/@angular/common/common.umd.js"></script>
|
||||||
|
<script src="node_modules/@angular/compiler/compiler.umd.js"></script>
|
||||||
|
<script src="node_modules/@angular/platform-browser/platform-browser.umd.js"></script>
|
||||||
|
<script src="node_modules/@angular/platform-browser-dynamic/platform-browser-dynamic.umd.js"></script>
|
||||||
|
<script src="node_modules/@angular/router-deprecated/router-deprecated.umd.js"></script>
|
||||||
|
|
||||||
<script src="app/data.service.js"></script>
|
<script src="app/data.service.js"></script>
|
||||||
<script src="app/hero.component.js"></script>
|
<script src="app/hero.component.js"></script>
|
||||||
<script src="app/hero-dsl.component.js"></script>
|
<script src="app/hero-dsl.component.js"></script>
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,4 +1,4 @@
|
|||||||
import {Injectable} from 'angular2/core';
|
import {Injectable} from '@angular/core';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DataService {
|
export class DataService {
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
Optional,
|
Optional,
|
||||||
Query,
|
Query,
|
||||||
QueryList
|
QueryList
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, Inject} from 'angular2/core';
|
import {Component, Inject} from '@angular/core';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
import {DataService} from './data.service';
|
import {DataService} from './data.service';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, EventEmitter, Input, Output} from 'angular2/core';
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import {Component, OnInit}
|
import {Component, OnInit}
|
||||||
from 'angular2/core';
|
from '@angular/core';
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion metadata
|
// #docregion metadata
|
||||||
import {Component} from 'angular2/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'hero-view',
|
selector: 'hero-view',
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, HostBinding, HostListener} from 'angular2/core';
|
import {Component, HostBinding, HostListener} from '@angular/core';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -4,7 +4,7 @@ import {
|
|||||||
ContentChild,
|
ContentChild,
|
||||||
QueryList,
|
QueryList,
|
||||||
Input
|
Input
|
||||||
} from 'angular2/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'active-label',
|
selector: 'active-label',
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
// #docregion ng2import
|
// #docregion ng2import
|
||||||
import {provide}
|
import {provide}
|
||||||
from 'angular2/core';
|
from '@angular/core';
|
||||||
import {bootstrap}
|
import {bootstrap}
|
||||||
from 'angular2/platform/browser';
|
from '@angular/platform-browser-dynamic';
|
||||||
import {
|
import {
|
||||||
} from 'angular2/router';
|
} from '@angular/router';
|
||||||
import {
|
import {
|
||||||
LocationStrategy,
|
LocationStrategy,
|
||||||
HashLocationStrategy
|
HashLocationStrategy
|
||||||
} from 'angular2/platform/common';
|
} from '@angular/common';
|
||||||
// #enddocregion ng2import
|
// #enddocregion ng2import
|
||||||
|
|
||||||
// #docregion appimport
|
// #docregion appimport
|
||||||
|
@ -2,30 +2,20 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="node_modules/rxjs/bundles/Rx.js"></script>
|
|
||||||
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
|
<script src="systemjs.config.js"></script>
|
||||||
<script src="node_modules/angular2/bundles/router.dev.js"></script>
|
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroDetailsComponent} from './hero-details.component';
|
import {HeroDetailsComponent} from './hero-details.component';
|
||||||
import {HeroControlsComponent} from './hero-controls.component';
|
import {HeroControlsComponent} from './hero-controls.component';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, HostBinding} from 'angular2/core';
|
import {Component, HostBinding} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroAppMainComponent} from './hero-app-main.component';
|
import {HeroAppMainComponent} from './hero-app-main.component';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
|
|
||||||
// #docregion inlinestyles
|
// #docregion inlinestyles
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
import {HeroTeamComponent} from './hero-team.component';
|
import {HeroTeamComponent} from './hero-team.component';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {Component, Input} from 'angular2/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {Hero} from './hero';
|
import {Hero} from './hero';
|
||||||
|
|
||||||
// #docregion stylelink
|
// #docregion stylelink
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {bootstrap} from 'angular2/platform/browser';
|
import {bootstrap} from '@angular/platform-browser-dynamic';
|
||||||
import {HeroAppComponent} from './hero-app.component';
|
import {HeroAppComponent} from './hero-app.component';
|
||||||
|
|
||||||
bootstrap(HeroAppComponent);
|
bootstrap(HeroAppComponent);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
import {Component, ViewEncapsulation} from 'angular2/core';
|
import {Component, ViewEncapsulation} from '@angular/core';
|
||||||
|
|
||||||
// #docregion
|
// #docregion
|
||||||
// Let TypeScript know about the special SystemJS __moduleName variable
|
// Let TypeScript know about the special SystemJS __moduleName variable
|
||||||
|
@ -1,30 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
<title>Component Styles</title>
|
<title>Component Styles</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
|
|
||||||
<!-- IE required polyfills, in this exact order -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="../node_modules/es6-shim/es6-shim.min.js"></script>
|
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
|
||||||
<script src="../node_modules/systemjs/dist/system-polyfills.js"></script>
|
|
||||||
<script src="../node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
|
|
||||||
|
|
||||||
<script src="../node_modules/angular2/bundles/angular2-polyfills.js"></script>
|
<script src="node_modules/zone.js/dist/zone.js"></script>
|
||||||
<script src="../node_modules/systemjs/dist/system.src.js"></script>
|
<script src="node_modules/reflect-metadata/Reflect.js"></script>
|
||||||
<script src="../node_modules/rxjs/bundles/Rx.js"></script>
|
<script src="node_modules/systemjs/dist/system.src.js"></script>
|
||||||
<script src="../node_modules/angular2/bundles/angular2.dev.js"></script>
|
|
||||||
|
<script src="systemjs.config.js"></script>
|
||||||
<script>
|
<script>
|
||||||
System.config({
|
System.import('app').catch(function(err){ console.error(err); });
|
||||||
packages: {
|
|
||||||
app: {
|
|
||||||
format: 'register',
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
System.import('app/main')
|
|
||||||
.then(null, console.error.bind(console));
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
**/*.js
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user