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',
'package.json',
'styles.css',
'systemjs.config.js',
'tsconfig.json',
'tslint.json',
'typings.json',

View File

@ -15,7 +15,12 @@ tslint.json
wallaby.js
npm-debug*.
protractor.config.js
systemjs.config.js
_test-output
_temp
**/ts/**/*.js
**/ts-snippets/**/*.js
**/ts/**/*.d.ts
!**/*e2e-spec.js
!systemjs.config.1.js

View File

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

View File

@ -1,5 +1,5 @@
// #docregion import
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
// #enddocregion import
import {HeroListComponent} from './hero-list.component';
import {SalesTaxComponent} from './sales-tax.component';
@ -14,4 +14,4 @@ import {SalesTaxComponent} from './sales-tax.component';
})
// #docregion export
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 {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';
@Component({
@ -7,5 +7,5 @@ import {Hero} from './hero';
directives: [HeroDetailComponent]
})
export class HeroDetailComponent {
@Input() hero:Hero;
}
@Input() hero: Hero;
}

View File

@ -1,5 +1,5 @@
// #docplaster
import {Component, OnInit} from 'angular2/core';
import {Component, OnInit} from '@angular/core';
import {Hero} from './hero';
import {HeroDetailComponent} from './hero-detail.component';
import {HeroService} from './hero.service';
@ -24,13 +24,13 @@ export class HeroesComponent { ... }
// #docregion class
export class HeroListComponent implements OnInit {
// #docregion ctor
constructor(private _service: HeroService){ }
constructor(private _service: HeroService) { }
// #enddocregion ctor
heroes:Hero[];
heroes: Hero[];
selectedHero: Hero;
ngOnInit(){
ngOnInit() {
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 {BackendService} from './backend.service';
import {Logger} from './logger.service';
@ -12,14 +12,14 @@ export class HeroService {
private _logger: Logger) { }
// #enddocregion ctor
private _heroes:Hero[] = [];
private _heroes: Hero[] = [];
getHeroes() {
this._backend.getAll(Hero).then( (heroes:Hero[]) => {
this._backend.getAll(Hero).then( (heroes: Hero[]) => {
this._logger.log(`Fetched ${heroes.length} heroes.`);
this._heroes.push(...heroes); // fill cache
});
return this._heroes;
}
}
// #enddocregion class
// #enddocregion class

View File

@ -1,10 +1,10 @@
let nextId = 1;
export class Hero {
id:number
id: number;
constructor(
public name:string,
public power?:string){
public name: string,
public power?: string) {
this.id = nextId++;
}
}
var nextId = 1;

View File

@ -1,5 +1,5 @@
// #docregion
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
@Injectable()
// #docregion class
@ -8,4 +8,4 @@ export class Logger {
error(msg: any) { console.error(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
import {AppComponent} from './app.component';
// #enddocregion import

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {SalesTaxService} from './sales-tax.service';
import {TaxRateService} from './tax-rate.service';

View File

@ -1,5 +1,5 @@
// #docregion
import {Injectable, Inject} from 'angular2/core';
import {Injectable, Inject} from '@angular/core';
import {TaxRateService} from './tax-rate.service';
// #docregion class

View File

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

View File

@ -1,30 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Intro to Angular 2</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Architecture of Angular 2</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/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/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
@ -32,4 +23,4 @@
<my-app>Loading...</my-app>
</body>
</html>
</html>

View File

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

View File

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

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {HighlightDirective} from './highlight.directive';
@Component({

View File

@ -1,5 +1,5 @@
// #docregion
import {Directive, ElementRef, Input} from 'angular2/core';
import {Directive, ElementRef, Input} from '@angular/core';
@Directive({
selector: '[myHighlight]'

View File

@ -1,5 +1,5 @@
// #docregion
import {Directive, ElementRef, Input} from 'angular2/core';
import {Directive, ElementRef, Input} from '@angular/core';
@Directive({
selector: '[myHighlight]',

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion full
import {Directive, ElementRef, Input} from 'angular2/core';
import {Directive, ElementRef, Input} from '@angular/core';
@Directive({
selector: '[myHighlight]',

View File

@ -1,5 +1,5 @@
// #docregion
import {bootstrap} from 'angular2/platform/browser';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app.component';
bootstrap(AppComponent);

View File

@ -2,33 +2,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Attribute Directives</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/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/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<body>
<my-app>loading...</my-app>
</body>

View File

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

View File

@ -1,5 +1,5 @@
import {Component} from 'angular2/core';
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from "angular2/router";
import {Component} from '@angular/core';
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from '@angular/router-deprecated';
import {MovieListComponent} from './movie-list.component';
import {MovieService} from './movie.service';
@ -19,7 +19,7 @@ import {StringSafeDatePipe} from './date.pipe';
])
export class AppComponent {
angularDocsUrl = "https://angular.io/";
angularDocsUrl = 'https://angular.io/';
colorPreference = 'red';
eventType = '<not clicked yet>';
isActive = true;
@ -27,8 +27,8 @@ export class AppComponent {
movie: IMovie = null;
movies: IMovie[] = [];
showImage = true;
title: string = "A1-A2 Quick Ref Cookbook";
toggleImage(event:UIEvent) {
title: string = 'A1-A2 Quick Ref Cookbook';
toggleImage(event: UIEvent) {
this.showImage = !this.showImage;
this.eventType = (event && event.type) || 'not provided';
}

View File

@ -1,14 +1,14 @@
import {Injectable, Pipe} from 'angular2/core';
import {DatePipe} from 'angular2/common';
import {Injectable, Pipe} from '@angular/core';
import {DatePipe} from '@angular/common';
@Injectable()
// #docregion date-pipe
@Pipe({name: 'date', pure: true})
export class StringSafeDatePipe extends DatePipe {
transform(value: any, args: string): string {
transform(value: any, format: string): string {
value = typeof value === 'string' ?
Date.parse(value) : value
return super.transform(value, args);
Date.parse(value) : value;
return super.transform(value, format);
}
}
// #enddocregion date-pipe

View File

@ -1,5 +1,5 @@
// #docregion
import {bootstrap} from 'angular2/platform/browser';
import {bootstrap} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app.component';
bootstrap(AppComponent);

View File

@ -1,7 +1,7 @@
// #docplaster
// #docregion import
import {Component} from 'angular2/core';
import {ROUTER_DIRECTIVES} from "angular2/router";
import {Component} from '@angular/core';
import {ROUTER_DIRECTIVES} from '@angular/router-deprecated';
// #enddocregion import
import {MovieService} from './movie.service';
import {IMovie} from './movie';

View File

@ -1,39 +1,39 @@
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {IMovie} from './movie';
@Injectable()
export class MovieService {
getMovies() : IMovie[] {
getMovies(): IMovie[] {
return [
{
hero: "Celeritas",
imageurl: "images/hero.png",
hero: 'Celeritas',
imageurl: 'images/hero.png',
movieId: 1,
mpaa: "pg-13",
releaseDate: "2015-12-19T00:00:00",
title: "Celeritas Reigns",
mpaa: 'pg-13',
releaseDate: '2015-12-19T00:00:00',
title: 'Celeritas Reigns',
price: 12.95,
starRating: 4.925,
approvalRating: .97
},
{
hero: "Mr. Nice",
imageurl: "images/villain.png",
hero: 'Mr. Nice',
imageurl: 'images/villain.png',
movieId: 2,
mpaa: "pg-13",
releaseDate: "2015-12-18T00:00:00",
title: "No More Mr. Nice Guy",
mpaa: 'pg-13',
releaseDate: '2015-12-18T00:00:00',
title: 'No More Mr. Nice Guy',
price: 14.95,
starRating: 4.6,
approvalRating: .94
},
{
hero: "Angular",
imageurl: "images/ng-logo.png",
hero: 'Angular',
imageurl: 'images/ng-logo.png',
movieId: 3,
mpaa: "pg-13",
releaseDate: "2015-12-17T00:00:00",
title: "Angular to the Rescue",
mpaa: 'pg-13',
releaseDate: '2015-12-17T00:00:00',
title: 'Angular to the Rescue',
price: 15.95,
starRating: 4.98,
approvalRating: .9995

View File

@ -2,33 +2,23 @@
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<title>Angular 1 to Angular 2 Quick Reference</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- #docregion style -->
<link rel="stylesheet" href="styles.css">
<!-- #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/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/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/router.dev.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

View File

@ -1,4 +1,4 @@
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {HeroParentComponent} from './hero-parent.component';
import {NameParentComponent} from './name-parent.component';
import {VersionParentComponent} from './version-parent.component';

View File

@ -1,5 +1,5 @@
// #docregion
import {Component, Input, OnDestroy} from 'angular2/core';
import {Component, Input, OnDestroy} from '@angular/core';
import {MissionService} from './mission.service';
import {Subscription} from 'rxjs/Subscription';

View File

@ -1,8 +1,8 @@
// #docplaster
// #docregion vc
import {AfterViewInit, ViewChild} from 'angular2/core';
import {AfterViewInit, ViewChild} from '@angular/core';
// #docregion lv
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {CountdownTimerComponent} from './countdown-timer.component';
// #enddocregion lv

View File

@ -1,5 +1,5 @@
// #docregion
import {Component, OnInit, OnDestroy} from 'angular2/core';
import {Component, OnInit, OnDestroy} from '@angular/core';
@Component({
selector:'countdown-timer',

View File

@ -1,5 +1,5 @@
// #docregion
import {Component, Input} from 'angular2/core';
import {Component, Input} from '@angular/core';
import {Hero} from './hero';
@Component({

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {HeroChildComponent} from './hero-child.component';
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';
bootstrap(AppComponent);

View File

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

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {AstronautComponent} from './astronaut.component';
import {MissionService} from './mission.service';

View File

@ -1,5 +1,5 @@
// #docregion
import {Component, Input} from 'angular2/core';
import {Component, Input} from '@angular/core';
@Component({
selector: 'name-child',

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {NameChildComponent} from './name-child.component';
@Component({

View File

@ -1,6 +1,6 @@
/* tslint:disable:forin */
// #docregion
import {Component, Input, OnChanges, SimpleChange} from 'angular2/core';
import {Component, Input, OnChanges, SimpleChange} from '@angular/core';
@Component({
selector: 'version-child',

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {VersionChildComponent} from './version-child.component';
@Component({

View File

@ -1,5 +1,5 @@
// #docregion
import {Component, EventEmitter, Input, Output} from 'angular2/core';
import {Component, EventEmitter, Input, Output} from '@angular/core';
@Component({
selector: 'my-voter',

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {VoterComponent} from './voter.component';
@Component({

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Passing information from parent to child</title>
<style>
.to-top {margin-top: 8px; display: block;}
@ -9,26 +9,16 @@
<link rel="stylesheet" href="styles.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/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/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

View File

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

View File

@ -1,5 +1,5 @@
// #docregion
import { Component } from 'angular2/core';
import { Component } from '@angular/core';
import { HeroBiosComponent,
HeroBiosAndContactsComponent} from './hero-bios.component';

View File

@ -1,6 +1,6 @@
/* tslint:disable:one-line:check-open-brace*/
// #docregion
import { Injectable } from 'angular2/core';
import { Injectable } from '@angular/core';
import { LoggerService } from './logger.service';
// #docregion minimal-logger

View File

@ -1,5 +1,5 @@
// #docregion
import {Component, Input, OnInit} from 'angular2/core';
import {Component, Input, OnInit} from '@angular/core';
import {Hero} from './hero';
import {HeroCacheService} from './hero-cache.service';

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion
import { Component} from 'angular2/core';
import { Component} from '@angular/core';
import { HeroContactComponent } from './hero-contact.component';
import { HeroBioComponent } from './hero-bio.component';

View File

@ -1,5 +1,5 @@
// #docregion
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {Hero} from './hero';
import {HeroService} from './hero.service';

View File

@ -1,6 +1,6 @@
// #docplaster
// #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 {LoggerService} from './logger.service';

View File

@ -1,13 +1,13 @@
/* tslint:disable:one-line:check-open-brace*/
// #docplaster
// #docregion opaque-token
import {OpaqueToken} from 'angular2/core';
import {OpaqueToken} from '@angular/core';
export const TITLE = new OpaqueToken('title');
// #enddocregion opaque-token
// #docregion hero-of-the-month
import { Component, Inject, provide } from 'angular2/core';
import { Component, Inject, provide } from '@angular/core';
import { DateLoggerService,
MinimalLogger } from './date-logger.service';

View File

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

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion
import {Directive, ElementRef, Input} from 'angular2/core';
import {Directive, ElementRef, Input} from '@angular/core';
@Directive({
selector: '[myHighlight]',

View File

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

View File

@ -1,16 +1,16 @@
// #docregion
import { bootstrap } from 'angular2/platform/browser';
import { provide } from 'angular2/core';
import { XHRBackend } from 'angular2/http';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { provide } from '@angular/core';
import { XHRBackend } from '@angular/http';
import { ROUTER_PROVIDERS } from 'angular2/router';
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
import { LocationStrategy,
HashLocationStrategy } from 'angular2/platform/common';
HashLocationStrategy } from '@angular/common';
import { HeroData } from './hero-data';
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';

View File

@ -2,7 +2,7 @@
/* tslint:disable:one-line:check-open-brace*/
// #docplaster
// #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)
export abstract class Base { name = 'Count Basie'; }

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion
import {OpaqueToken} from 'angular2/core';
import {OpaqueToken} from '@angular/core';
import {Hero} from './hero';
import {HeroService} from './hero.service';

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion
import {Component, OnInit} from 'angular2/core';
import {Component, OnInit} from '@angular/core';
import {Hero} from './hero';
import {HeroService} from './hero.service';

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {LoggerService} from './logger.service';
import {UserService} from './user.service';

View File

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

View File

@ -2,6 +2,7 @@
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<title>Dependency Injection</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- #docregion style -->
@ -9,31 +10,16 @@
<link rel="stylesheet" href="sample.css">
<!-- #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/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/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="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 src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>

View File

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

View File

@ -1,5 +1,5 @@
// #docregion
import {Component} from 'angular2/core'
import {Component} from '@angular/core'
import {DynamicForm} from './dynamic-form.component';
import {QuestionService} from './question.service';

View File

@ -1,6 +1,6 @@
// #docregion
import {Component, Input} from 'angular2/core';
import {ControlGroup} from 'angular2/common';
import {Component, Input} from '@angular/core';
import {ControlGroup} from '@angular/common';
import {QuestionBase} from './question-base';
@Component({

View File

@ -1,6 +1,6 @@
// #docregion
import {Component, Input, OnInit} from 'angular2/core';
import {ControlGroup} from 'angular2/common';
import {Component, Input, OnInit} from '@angular/core';
import {ControlGroup} from '@angular/common';
import {QuestionBase} from './question-base';
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';
bootstrap(AppComponent, [])

View File

@ -1,6 +1,6 @@
// #docregion
import {Injectable} from 'angular2/core';
import {ControlGroup, FormBuilder, Validators} from 'angular2/common';
import {Injectable} from '@angular/core';
import {ControlGroup, FormBuilder, Validators} from '@angular/common';
import {QuestionBase} from './question-base';
@Injectable()

View File

@ -1,5 +1,5 @@
// #docregion
import {Injectable} from 'angular2/core';
import {Injectable} from '@angular/core';
import {QuestionBase} from './question-base';
import {DynamicForm} from './dynamic-form.component';
import {TextboxQuestion} from './question-textbox';

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<base href="/">
<title>Dynamic Form</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -9,29 +10,18 @@
<link rel="stylesheet" href="sample.css">
<!-- #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/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/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<body>
<my-app>Loading app...</my-app>
</body>

View File

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

View File

@ -1,8 +1,8 @@
// #docplaster
// #docregion
// Import the native Angular services.
import { Component } from 'angular2/core';
import { Title } from 'angular2/platform/browser';
import { Component } from '@angular/core';
import { Title } from '@angular/platform-browser';
@Component({
selector: 'my-app',

View File

@ -1,5 +1,5 @@
// #docregion
import { bootstrap } from 'angular2/platform/browser';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { AppComponent } from './app.component';
// 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,
// we have to explicitly provide the Angular service in our top component.
// #docregion bootstrap-title
import { Title } from 'angular2/platform/browser';
import { Title } from '@angular/platform-browser';
bootstrap(AppComponent, [ Title ])
// #enddocregion bootstrap-title

View File

@ -14,50 +14,27 @@
<link rel="stylesheet" type="text/css" href="sample.css">
<!-- #enddocregion style -->
<!-- IE required polyfills, in this exact order -->
<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>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.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>
// Configure our module loader.
System.config({
packages: {
app: {
format: "register",
defaultExtension: "js"
}
}
});
<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>
// 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>
</head>
<script src="systemjs.config.js"></script>
<script>
System.import('app')
.then(function() { console.info( "System.js loaded your application module." )})
.catch(function(err){ console.error(err); });
</script>
</head>
<body>
<h1>
Setting The Document Title Using The Title Service
</h1>
<my-app>
Loading app...
</my-app>
<my-app>Loading app...</my-app>
</body>
</html>

View File

@ -12,7 +12,7 @@
this.active = true;
}
});
// #docregion content
var HeroComponent = ng.core.Component({
selector: 'hero',
@ -38,7 +38,7 @@
var AppComponent = ng.core.Component({
selector: 'heroes-queries',
template:
'<hero *ngFor="#hero of heroData"' +
'<hero *ngFor="let hero of heroData"' +
'[hero]="hero">' +
'<active-label></active-label>' +
'</hero>' +

View File

@ -7,11 +7,11 @@
var provide =
ng.core.provide;
var bootstrap =
ng.platform.browser.bootstrap;
ng.platformBrowserDynamic.bootstrap;
var LocationStrategy =
ng.router.LocationStrategy;
ng.common.LocationStrategy;
var HashLocationStrategy =
ng.router.HashLocationStrategy;
ng.common.HashLocationStrategy;
// #enddocregion ng2import
// #docregion appimport

View File

@ -5,14 +5,19 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/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/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/hero.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="#dependency-injection">Dependency Injection</a><br>
<a href="#other-property-metadata">Host and Query Metadata</a><br>
<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-2>Loading hero-view2...</hero-view-2>
<hero-lifecycle>Loading hero-lifecycle...</hero-lifecycle>
<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>
<hr>
<h4 id="dependency-injection">Dependency Injection</h4>
<h4 id="dependency-injection">Dependency Injection</h4>
<hero-di>Loading hero-di...</hero-di>
<hero-di-inline>Loading hero-di-inline...</hero-di-inline>
<hero-di-inline2>Loading hero-di-inline2...</hero-di-inline2>
<hero-di-inject>Loading hero-di-inject...</hero-di-inject>
<hero-di-inject-additional>Loading hero-di-inject-additional...</hero-di-inject-additional>
<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-queries>Loading heroes-queries...</heroes-queries>
</body>

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
import {DataService} from './data.service';
// #docregion

View File

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

View File

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

View File

@ -1,6 +1,6 @@
// #docplaster
// #docregion metadata
import {Component} from 'angular2/core';
import {Component} from '@angular/core';
@Component({
selector: 'hero-view',

View File

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

View File

@ -4,7 +4,7 @@ import {
ContentChild,
QueryList,
Input
} from 'angular2/core';
} from '@angular/core';
@Component({
selector: 'active-label',

View File

@ -1,14 +1,14 @@
// #docregion ng2import
import {provide}
from 'angular2/core';
from '@angular/core';
import {bootstrap}
from 'angular2/platform/browser';
from '@angular/platform-browser-dynamic';
import {
} from 'angular2/router';
} from '@angular/router';
import {
LocationStrategy,
HashLocationStrategy
} from 'angular2/platform/common';
} from '@angular/common';
// #enddocregion ng2import
// #docregion appimport

View File

@ -2,30 +2,20 @@
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/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/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/router.dev.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
@ -36,24 +26,24 @@
<a href="#property-metadata">Input and Output Metadata</a><br>
<a href="#dependency-injection">Dependency Injection</a><br>
<a href="#other-property-metadata">Host and Query Metadata</a><br>
<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-lifecycle>Loading hero-lifecycle...</hero-lifecycle>
<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>
<hr>
<h4 id="dependency-injection">Dependency Injection</h4>
<h4 id="dependency-injection">Dependency Injection</h4>
<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>
<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-queries id="other-property-metadata">Loading heroes-queries...</heroes-queries>
</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 {HeroDetailsComponent} from './hero-details.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 {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';
// #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 {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';
// #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';
bootstrap(HeroAppComponent);

View File

@ -1,5 +1,5 @@
// #docplaster
import {Component, ViewEncapsulation} from 'angular2/core';
import {Component, ViewEncapsulation} from '@angular/core';
// #docregion
// Let TypeScript know about the special SystemJS __moduleName variable

View File

@ -1,32 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Component Styles</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/systemjs/dist/system-polyfills.js"></script>
<script src="../node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="../node_modules/angular2/bundles/angular2-polyfills.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="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="systemjs.config.js"></script>
<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
}
}
});
System.import('app/main')
.then(null, console.error.bind(console));
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
</head>
<body>
<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