chore: update to rc.0

This commit is contained in:
Ward Bell 2016-04-27 11:28:22 -07:00 committed by Naomi Black
parent 49908bb1b4
commit 3d5302adce
493 changed files with 2383 additions and 2686 deletions

View File

@ -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',

View File

@ -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

View File

@ -1 +0,0 @@
**/*.js

View File

@ -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';
@ -14,4 +14,4 @@ import {SalesTaxComponent} from './sales-tax.component';
}) })
// #docregion export // #docregion export
export class AppComponent { } export class AppComponent { }
// #enddocregion export // #enddocregion export

View File

@ -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';

View File

@ -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({
@ -7,5 +7,5 @@ import {Hero} from './hero';
directives: [HeroDetailComponent] directives: [HeroDetailComponent]
}) })
export class HeroDetailComponent { export class HeroDetailComponent {
@Input() hero:Hero; @Input() hero: Hero;
} }

View File

@ -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';
@ -24,13 +24,13 @@ export class HeroesComponent { ... }
// #docregion class // #docregion class
export class HeroListComponent implements OnInit { export class HeroListComponent implements OnInit {
// #docregion ctor // #docregion ctor
constructor(private _service: HeroService){ } constructor(private _service: HeroService) { }
// #enddocregion ctor // #enddocregion ctor
heroes:Hero[]; heroes: Hero[];
selectedHero: Hero; selectedHero: Hero;
ngOnInit(){ ngOnInit() {
this.heroes = this._service.getHeroes(); this.heroes = this._service.getHeroes();
} }

View File

@ -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';
@ -12,14 +12,14 @@ export class HeroService {
private _logger: Logger) { } private _logger: Logger) { }
// #enddocregion ctor // #enddocregion ctor
private _heroes:Hero[] = []; private _heroes: Hero[] = [];
getHeroes() { getHeroes() {
this._backend.getAll(Hero).then( (heroes:Hero[]) => { this._backend.getAll(Hero).then( (heroes: Hero[]) => {
this._logger.log(`Fetched ${heroes.length} heroes.`); this._logger.log(`Fetched ${heroes.length} heroes.`);
this._heroes.push(...heroes); // fill cache this._heroes.push(...heroes); // fill cache
}); });
return this._heroes; return this._heroes;
} }
} }
// #enddocregion class // #enddocregion class

View File

@ -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;

View File

@ -1,5 +1,5 @@
// #docregion // #docregion
import {Injectable} from 'angular2/core'; import {Injectable} from '@angular/core';
@Injectable() @Injectable()
// #docregion class // #docregion class
@ -8,4 +8,4 @@ export class Logger {
error(msg: any) { console.error(msg); } error(msg: any) { console.error(msg); }
warn(msg: any) { console.warn(msg); } warn(msg: any) { console.warn(msg); }
} }
// #enddocregion class // #enddocregion class

View File

@ -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

View File

@ -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';

View File

@ -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

View File

@ -1,5 +1,5 @@
// #docregion // #docregion
import {Injectable} from 'angular2/core'; import {Injectable} from '@angular/core';
// #docregion class // #docregion class
@Injectable() @Injectable()

View File

@ -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 name="viewport" content="width=device-width, initial-scale=1"> <meta charset="UTF-8">
<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>
@ -32,4 +23,4 @@
<my-app>Loading...</my-app> <my-app>Loading...</my-app>
</body> </body>
</html> </html>

View File

@ -1,8 +1,8 @@
{ {
"description": "Intro to Angular2", "description": "Intro to Angular2",
"files":[ "files":[
"!**/*.d.ts", "!**/*.d.ts",
"!**/*.js", "!**/*.js",
"!app/hero-list.component.1.*" "!app/hero-list.component.1.*"
] ]
} }

View File

@ -1 +0,0 @@
**/*.js

View File

@ -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({

View File

@ -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]'

View File

@ -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]',

View File

@ -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]',

View File

@ -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);

View File

@ -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>

View File

@ -1 +0,0 @@
**/*.js

View File

@ -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,8 +27,8 @@ 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';
} }

View File

@ -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

View File

@ -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);

View File

@ -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';

View File

@ -1,39 +1,39 @@
import {Injectable} from 'angular2/core'; import {Injectable} from '@angular/core';
import {IMovie} from './movie'; import {IMovie} from './movie';
@Injectable() @Injectable()
export class MovieService { 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

View File

@ -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>

View File

@ -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';

View File

@ -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';

View File

@ -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

View File

@ -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',

View File

@ -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({

View File

@ -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';

View File

@ -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);

View File

@ -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()

View File

@ -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';

View File

@ -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',

View File

@ -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({

View File

@ -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',

View File

@ -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({

View File

@ -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',

View File

@ -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({

View File

@ -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>

View File

@ -1 +0,0 @@
**/*.js

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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()

View File

@ -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]',

View File

@ -1,5 +1,5 @@
// #docregion // #docregion
import {Injectable} from 'angular2/core'; import {Injectable} from '@angular/core';
@Injectable() @Injectable()
export class LoggerService { export class LoggerService {

View File

@ -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';

View File

@ -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'; }

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -1,5 +1,5 @@
// #docregion // #docregion
import {Injectable} from 'angular2/core'; import {Injectable} from '@angular/core';
@Injectable() @Injectable()
export class UserService { export class UserService {

View File

@ -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>

View File

@ -1 +0,0 @@
**/*.js

View File

@ -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';

View File

@ -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({

View File

@ -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';

View File

@ -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, [])

View File

@ -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()

View File

@ -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';

View File

@ -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>

View File

@ -1,2 +0,0 @@
**/*.js
npm-debug.log

View File

@ -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',

View File

@ -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

View File

@ -14,50 +14,27 @@
<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/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>
// Configure our module loader.
System.config({
packages: {
app: {
format: "register",
defaultExtension: "js"
}
}
});
// Load the root module (which will, in turn, bootstrap the Angular 2 application). <script src="systemjs.config.js"></script>
System <script>
.import( "app/main" ) System.import('app')
.then( .then(function() { console.info( "System.js loaded your application module." )})
function handleSuccess() { .catch(function(err){ console.error(err); });
console.info( "System.js loaded your application module." ); </script>
}, </head>
function handleError( error ) {
console.warn( "System.js could not load your application module." );
console.error( error );
}
);
</script>
</head>
<body> <body>
<h1> <h1>
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>

View File

@ -12,7 +12,7 @@
this.active = true; this.active = true;
} }
}); });
// #docregion content // #docregion content
var HeroComponent = ng.core.Component({ var HeroComponent = ng.core.Component({
selector: 'hero', selector: 'hero',
@ -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>' +

View File

@ -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

View File

@ -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>
@ -34,27 +39,27 @@
<a href="#property-metadata">Input and Output Metadata</a><br> <a href="#property-metadata">Input and Output Metadata</a><br>
<a href="#dependency-injection">Dependency Injection</a><br> <a href="#dependency-injection">Dependency Injection</a><br>
<a href="#other-property-metadata">Host and Query Metadata</a><br> <a href="#other-property-metadata">Host and Query Metadata</a><br>
<hr> <hr>
<h4 id="class-metadata">Classes and Class Metadata</h4> <h4 id="class-metadata">Classes and Class Metadata</h4>
<hero-view>Loading hero-view...</hero-view> <hero-view>Loading hero-view...</hero-view>
<hero-view-2>Loading hero-view2...</hero-view-2> <hero-view-2>Loading hero-view2...</hero-view-2>
<hero-lifecycle>Loading hero-lifecycle...</hero-lifecycle> <hero-lifecycle>Loading hero-lifecycle...</hero-lifecycle>
<hr> <hr>
<h4 id="property-metadata">Input and Output Metadata</h4> <h4 id="property-metadata">Input and Output Metadata</h4>
<hero-io>Loading hero-io...</hero-io> <hero-io>Loading hero-io...</hero-io>
<hr> <hr>
<h4 id="dependency-injection">Dependency Injection</h4> <h4 id="dependency-injection">Dependency Injection</h4>
<hero-di>Loading hero-di...</hero-di> <hero-di>Loading hero-di...</hero-di>
<hero-di-inline>Loading hero-di-inline...</hero-di-inline> <hero-di-inline>Loading hero-di-inline...</hero-di-inline>
<hero-di-inline2>Loading hero-di-inline2...</hero-di-inline2> <hero-di-inline2>Loading hero-di-inline2...</hero-di-inline2>
<hero-di-inject>Loading hero-di-inject...</hero-di-inject> <hero-di-inject>Loading hero-di-inject...</hero-di-inject>
<hero-di-inject-additional>Loading hero-di-inject-additional...</hero-di-inject-additional> <hero-di-inject-additional>Loading hero-di-inject-additional...</hero-di-inject-additional>
<hr> <hr>
<h4 id="other-property-metadata">Host and Query Metadata</h4> <h4 id="other-property-metadata">Host and Query Metadata</h4>
<heroes-bindings>Loading heroes-bindings...</heroes-bindings> <heroes-bindings>Loading heroes-bindings...</heroes-bindings>
<heroes-queries>Loading heroes-queries...</heroes-queries> <heroes-queries>Loading heroes-queries...</heroes-queries>
</body> </body>

View File

@ -1 +0,0 @@
**/*.js

View File

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/core'; import {Injectable} from '@angular/core';
@Injectable() @Injectable()
export class DataService { export class DataService {

View File

@ -6,7 +6,7 @@ import {
Optional, Optional,
Query, Query,
QueryList QueryList
} from 'angular2/core'; } from '@angular/core';
// #docregion // #docregion
@Component({ @Component({

View File

@ -1,4 +1,4 @@
import {Component, Inject} from 'angular2/core'; import {Component, Inject} from '@angular/core';
// #docregion // #docregion
@Component({ @Component({

View File

@ -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

View File

@ -1,4 +1,4 @@
import {Component, EventEmitter, Input, Output} from 'angular2/core'; import {Component, EventEmitter, Input, Output} from '@angular/core';
// #docregion // #docregion
@Component({ @Component({

View File

@ -1,7 +1,7 @@
// #docplaster // #docplaster
// #docregion // #docregion
import {Component, OnInit} import {Component, OnInit}
from 'angular2/core'; from '@angular/core';
// #enddocregion // #enddocregion
@Component({ @Component({

View File

@ -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',

View File

@ -1,4 +1,4 @@
import {Component, HostBinding, HostListener} from 'angular2/core'; import {Component, HostBinding, HostListener} from '@angular/core';
// #docregion // #docregion
@Component({ @Component({

View File

@ -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',

View File

@ -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

View File

@ -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>
@ -36,24 +26,24 @@
<a href="#property-metadata">Input and Output Metadata</a><br> <a href="#property-metadata">Input and Output Metadata</a><br>
<a href="#dependency-injection">Dependency Injection</a><br> <a href="#dependency-injection">Dependency Injection</a><br>
<a href="#other-property-metadata">Host and Query Metadata</a><br> <a href="#other-property-metadata">Host and Query Metadata</a><br>
<hr> <hr>
<h4 id="class-metadata">Classes and Class Metadata</h4> <h4 id="class-metadata">Classes and Class Metadata</h4>
<hero-view id="class-metadata">Loading hero-view...</hero-view> <hero-view id="class-metadata">Loading hero-view...</hero-view>
<hero-lifecycle>Loading hero-lifecycle...</hero-lifecycle> <hero-lifecycle>Loading hero-lifecycle...</hero-lifecycle>
<hr> <hr>
<h4 id="property-metadata">Input and Output Metadata</h4> <h4 id="property-metadata">Input and Output Metadata</h4>
<hero-io>Loading hero-io...</hero-io> <hero-io>Loading hero-io...</hero-io>
<hr> <hr>
<h4 id="dependency-injection">Dependency Injection</h4> <h4 id="dependency-injection">Dependency Injection</h4>
<hero-di>Loading hero-di...</hero-di> <hero-di>Loading hero-di...</hero-di>
<hero-di-inject>Loading hero-di-inject...</hero-di-inject> <hero-di-inject>Loading hero-di-inject...</hero-di-inject>
<hero-di-inject-additional>Loading hero-di-inject-additional...</hero-di-inject-additional> <hero-di-inject-additional>Loading hero-di-inject-additional...</hero-di-inject-additional>
<hr> <hr>
<h4 id="other-property-metadata">Host and Query Metadata</h4> <h4 id="other-property-metadata">Host and Query Metadata</h4>
<heroes-bindings>Loading heroes-bindings...</heroes-bindings> <heroes-bindings>Loading heroes-bindings...</heroes-bindings>
<heroes-queries id="other-property-metadata">Loading heroes-queries...</heroes-queries> <heroes-queries id="other-property-metadata">Loading heroes-queries...</heroes-queries>
</body> </body>

View File

@ -1 +0,0 @@
**/*.js

View File

@ -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';

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -1,32 +1,23 @@
<!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>
<body> <body>
<h1 style="visibility: hidden;">External H1 Title for E2E test</h1> <h1 style="visibility: hidden;">External H1 Title for E2E test</h1>

Some files were not shown because too many files have changed in this diff Show More