chore: update to rc6 (#2177)
This commit is contained in:
parent
b2781d96dc
commit
0c962712b3
@ -633,6 +633,7 @@ gulp.task('build-dart-api-docs', ['_shred-api-examples', 'dartdoc'], function()
|
|||||||
return buildApiDocsForDart();
|
return buildApiDocsForDart();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Using the --build flag will use systemjs.config.plunker.build.js (for preview builds)
|
||||||
gulp.task('build-plunkers', ['_copy-example-boilerplate'], function() {
|
gulp.task('build-plunkers', ['_copy-example-boilerplate'], function() {
|
||||||
regularPlunker.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log, build: argv.build });
|
regularPlunker.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log, build: argv.build });
|
||||||
return embeddedPlunker.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log, build: argv.build });
|
return embeddedPlunker.buildPlunkers(EXAMPLES_PATH, LIVE_EXAMPLES_PATH, { errFn: gutil.log, build: argv.build });
|
||||||
|
@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@shrinkOut="'in'">
|
[@shrinkOut]="'in'">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -27,7 +27,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@heroState="hero.state"
|
[@heroState]="hero.state"
|
||||||
(click)="hero.toggleState()">
|
(click)="hero.toggleState()">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
|
@ -20,7 +20,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@heroState="hero.state"
|
[@heroState]="hero.state"
|
||||||
(click)="hero.toggleState()">
|
(click)="hero.toggleState()">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
|
@ -18,7 +18,7 @@ import { Heroes } from './hero.service';
|
|||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
(click)="hero.toggleState()"
|
(click)="hero.toggleState()"
|
||||||
@heroState="hero.state">
|
[@heroState]="hero.state">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@flyInOut="'in'">
|
[@flyInOut]="'in'">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@flyInOut="'in'">
|
[@flyInOut]="'in'">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -19,7 +19,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@heroState="hero.state"
|
[@heroState]="hero.state"
|
||||||
(click)="hero.toggleState()">
|
(click)="hero.toggleState()">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
|
@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@flyInOut="'in'">
|
[@flyInOut]="'in'">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -16,7 +16,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@flyInOut="'in'"
|
[@flyInOut]="'in'"
|
||||||
(click)="hero.toggleState()">
|
(click)="hero.toggleState()">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
|
@ -20,7 +20,7 @@ import { Heroes } from './hero.service';
|
|||||||
template: `
|
template: `
|
||||||
<ul>
|
<ul>
|
||||||
<li *ngFor="let hero of heroes"
|
<li *ngFor="let hero of heroes"
|
||||||
@heroState="hero.state"
|
[@heroState]="hero.state"
|
||||||
(click)="hero.toggleState()">
|
(click)="hero.toggleState()">
|
||||||
{{hero.name}}
|
{{hero.name}}
|
||||||
</li>
|
</li>
|
||||||
|
@ -13,7 +13,7 @@ const HEROES = [
|
|||||||
export class BackendService {
|
export class BackendService {
|
||||||
constructor(private logger: Logger) {}
|
constructor(private logger: Logger) {}
|
||||||
|
|
||||||
getAll(type: Type): PromiseLike<any[]> {
|
getAll(type: Type<any>): PromiseLike<any[]> {
|
||||||
if (type === Hero) {
|
if (type === Hero) {
|
||||||
// TODO get from the database
|
// TODO get from the database
|
||||||
return Promise.resolve<Hero[]>(HEROES);
|
return Promise.resolve<Hero[]>(HEROES);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
@ -30,12 +30,17 @@ let directives: any[] = [
|
|||||||
VoteTakerComponent
|
VoteTakerComponent
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let schemas: any[] = [];
|
||||||
|
|
||||||
// Include Countdown examples
|
// Include Countdown examples
|
||||||
// unless in e2e tests which they break.
|
// unless in e2e tests which they break.
|
||||||
if (!/e2e/.test(location.search)) {
|
if (!/e2e/.test(location.search)) {
|
||||||
console.log('adding countdown timer examples');
|
console.log('adding countdown timer examples');
|
||||||
directives.push(CountdownLocalVarParentComponent);
|
directives.push(CountdownLocalVarParentComponent);
|
||||||
directives.push(CountdownViewChildParentComponent);
|
directives.push(CountdownViewChildParentComponent);
|
||||||
|
} else {
|
||||||
|
// In e2e test use CUSTOM_ELEMENTS_SCHEMA to supress unknown element errors
|
||||||
|
schemas.push(CUSTOM_ELEMENTS_SCHEMA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -43,6 +48,7 @@ if (!/e2e/.test(location.search)) {
|
|||||||
BrowserModule
|
BrowserModule
|
||||||
],
|
],
|
||||||
declarations: directives,
|
declarations: directives,
|
||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ],
|
||||||
|
schemas: schemas
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
browserDynamicPlatform().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { SomeAbsoluteComponent, SomeRelativeComponent } from './some.component';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-app',
|
selector: 'my-app',
|
||||||
template:
|
template:
|
||||||
`<h1>Absolute & <i>Component-Relative</i> Paths</h1>
|
`<h1>Absolute & <i>Component-Relative</i> Paths</h1>
|
||||||
<absolute-path></absolute-path>
|
<absolute-path></absolute-path>
|
||||||
<relative-path></relative-path>
|
<relative-path></relative-path>
|
||||||
`,
|
`
|
||||||
directives: [SomeAbsoluteComponent, SomeRelativeComponent]
|
|
||||||
})
|
})
|
||||||
export class AppComponent {}
|
export class AppComponent {}
|
||||||
|
@ -2,13 +2,16 @@ import { NgModule } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
import { SomeAbsoluteComponent, SomeRelativeComponent } from './some.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule
|
BrowserModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent
|
AppComponent,
|
||||||
|
SomeAbsoluteComponent,
|
||||||
|
SomeRelativeComponent
|
||||||
],
|
],
|
||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ]
|
||||||
})
|
})
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/* tslint:disable:*/
|
/* tslint:disable:*/
|
||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, forwardRef, Optional, provide, SkipSelf } from '@angular/core';
|
import { Component, forwardRef, Optional, SkipSelf } from '@angular/core';
|
||||||
|
|
||||||
// A component base class (see AlexComponent)
|
// A component base class (see AlexComponent)
|
||||||
export abstract class Base { name = 'Count Basie'; }
|
export abstract class Base { name = 'Count Basie'; }
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
browserDynamicPlatform().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -25,7 +25,7 @@ describe('TypeScript to Javascript tests', function () {
|
|||||||
it('should support optional, attribute, and query injections', function () {
|
it('should support optional, attribute, and query injections', function () {
|
||||||
let app = element(by.css('hero-di-inject-additional'));
|
let app = element(by.css('hero-di-inject-additional'));
|
||||||
let h1 = app.element(by.css('h1'));
|
let h1 = app.element(by.css('h1'));
|
||||||
let okMsg = app.element(by.css('.ok-msg'));
|
let okMsg = app.element(by.css('p'));
|
||||||
|
|
||||||
expect(h1.getText()).toBe('Tour of Heroes');
|
expect(h1.getText()).toBe('Tour of Heroes');
|
||||||
app.element(by.buttonText('OK')).click();
|
app.element(by.buttonText('OK')).click();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
template:
|
template:
|
||||||
'<h1>{{titlePrefix}} {{title}}</h1>' +
|
'<h1>{{titlePrefix}} {{title}}</h1>' +
|
||||||
'<button (click)="ok()">OK</button>' +
|
'<button (click)="ok()">OK</button>' +
|
||||||
'<ng-content></ng-content>'
|
'<p>{{ msg }}</p>'
|
||||||
}).Class({
|
}).Class({
|
||||||
constructor: [
|
constructor: [
|
||||||
[
|
[
|
||||||
@ -14,20 +14,14 @@
|
|||||||
new ng.core.Inject('titlePrefix')
|
new ng.core.Inject('titlePrefix')
|
||||||
],
|
],
|
||||||
new ng.core.Attribute('title'),
|
new ng.core.Attribute('title'),
|
||||||
[
|
function(titlePrefix, title) {
|
||||||
new ng.core.Query('okMsg'),
|
|
||||||
ng.core.ElementRef
|
|
||||||
],
|
|
||||||
function(titlePrefix, title, msg) {
|
|
||||||
this.titlePrefix = titlePrefix;
|
this.titlePrefix = titlePrefix;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.msg = msg;
|
this.msg = '';
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
ok: function() {
|
ok: function() {
|
||||||
var msgEl =
|
this.msg = 'OK!';
|
||||||
this.msg.first.nativeElement;
|
|
||||||
msgEl.textContent = 'OK!';
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
@ -35,7 +29,6 @@
|
|||||||
var AppComponent = ng.core.Component({
|
var AppComponent = ng.core.Component({
|
||||||
selector: 'hero-di-inject-additional',
|
selector: 'hero-di-inject-additional',
|
||||||
template: '<hero-title title="Tour of Heroes">' +
|
template: '<hero-title title="Tour of Heroes">' +
|
||||||
'<span #okMsg class="ok-msg"></span>' +
|
|
||||||
'</hero-title>'
|
'</hero-title>'
|
||||||
}).Class({
|
}).Class({
|
||||||
constructor: function() { }
|
constructor: function() { }
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
// #enddocregion appimport
|
// #enddocregion appimport
|
||||||
|
|
||||||
// #docregion ng2import
|
// #docregion ng2import
|
||||||
var bootstrap =
|
var platformBrowserDynamic =
|
||||||
ng.platformBrowserDynamic.bootstrap;
|
ng.platformBrowserDynamic.platformBrowserDynamic;
|
||||||
var LocationStrategy =
|
var LocationStrategy =
|
||||||
ng.common.LocationStrategy;
|
ng.common.LocationStrategy;
|
||||||
var HashLocationStrategy =
|
var HashLocationStrategy =
|
||||||
@ -17,20 +17,17 @@
|
|||||||
// #enddocregion appimport
|
// #enddocregion appimport
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
var platformBrowserDynamic = ng.platformBrowserDynamic.platformBrowserDynamic();
|
platformBrowserDynamic().bootstrapModule(app.HeroesModule);
|
||||||
|
platformBrowserDynamic().bootstrapModule(app.HeroesDslModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesLifecycleModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesDslModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesDIModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesLifecycleModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroDIInlineModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesDIModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroDIInlineModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectModule2);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectAdditionalModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectModule2);
|
platformBrowserDynamic().bootstrapModule(app.HeroesIOModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectAdditionalModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesHostBindingsModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesIOModule);
|
platformBrowserDynamic().bootstrapModule(app.HeroesQueriesModule);
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesHostBindingsModule);
|
|
||||||
|
|
||||||
platformBrowserDynamic.bootstrapModule(app.HeroesQueriesModule);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// #docregion appimport
|
// #docregion appimport
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
Attribute,
|
Attribute,
|
||||||
Component,
|
Component,
|
||||||
ElementRef,
|
|
||||||
Inject,
|
Inject,
|
||||||
Optional,
|
Optional,
|
||||||
Query,
|
|
||||||
QueryList,
|
|
||||||
NgModule
|
NgModule
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
@ -16,24 +13,21 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
template: `
|
template: `
|
||||||
<h1>{{titlePrefix}} {{title}}</h1>
|
<h1>{{titlePrefix}} {{title}}</h1>
|
||||||
<button (click)="ok()">OK</button>
|
<button (click)="ok()">OK</button>
|
||||||
<ng-content></ng-content>
|
<p>{{ msg }}</p>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
class TitleComponent {
|
class TitleComponent {
|
||||||
|
private msg: string = '';
|
||||||
constructor(
|
constructor(
|
||||||
@Inject('titlePrefix')
|
@Inject('titlePrefix')
|
||||||
@Optional()
|
@Optional()
|
||||||
private titlePrefix: string,
|
private titlePrefix: string,
|
||||||
@Attribute('title')
|
@Attribute('title')
|
||||||
private title: string,
|
private title: string) {
|
||||||
@Query('okMsg')
|
|
||||||
private msg: QueryList<ElementRef>) {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ok() {
|
ok() {
|
||||||
let msgEl =
|
this.msg = 'OK!';
|
||||||
this.msg.first.nativeElement;
|
|
||||||
msgEl.textContent = 'OK!';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
@ -41,7 +35,6 @@ class TitleComponent {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'hero-di-inject-additional',
|
selector: 'hero-di-inject-additional',
|
||||||
template: `<hero-title title="Tour of Heroes">
|
template: `<hero-title title="Tour of Heroes">
|
||||||
<span #okMsg class="ok-msg"></span>
|
|
||||||
</hero-title>`
|
</hero-title>`
|
||||||
})
|
})
|
||||||
class AppComponent { }
|
class AppComponent { }
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/* tslint:disable no-unused-variable */
|
/* tslint:disable no-unused-variable */
|
||||||
// #docregion ng2import
|
// #docregion ng2import
|
||||||
import { bootstrap }
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
from '@angular/platform-browser-dynamic';
|
|
||||||
import {
|
import {
|
||||||
LocationStrategy,
|
LocationStrategy,
|
||||||
HashLocationStrategy
|
HashLocationStrategy
|
||||||
@ -12,8 +11,6 @@ import {
|
|||||||
import { HeroComponent } from './hero.component';
|
import { HeroComponent } from './hero.component';
|
||||||
// #enddocregion appimport
|
// #enddocregion appimport
|
||||||
|
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
||||||
|
|
||||||
import { HeroesModule } from './hero.component';
|
import { HeroesModule } from './hero.component';
|
||||||
import { HeroesLifecycleModule } from './hero-lifecycle.component';
|
import { HeroesLifecycleModule } from './hero-lifecycle.component';
|
||||||
import { HeroesDIModule } from './hero-di.component';
|
import { HeroesDIModule } from './hero-di.component';
|
||||||
|
@ -7,9 +7,21 @@ import { HeroesComponent } from './heroes/heroes.component';
|
|||||||
import { HeroListComponent } from './heroes/hero-list.component';
|
import { HeroListComponent } from './heroes/hero-list.component';
|
||||||
import { InjectorComponent } from './injector.component';
|
import { InjectorComponent } from './injector.component';
|
||||||
import { TestComponent } from './test.component';
|
import { TestComponent } from './test.component';
|
||||||
import { ProvidersComponent } from './providers.component';
|
|
||||||
import { APP_CONFIG, HERO_DI_CONFIG } from './app.config';
|
import { APP_CONFIG, HERO_DI_CONFIG } from './app.config';
|
||||||
import { UserService } from './user.service';
|
import { UserService } from './user.service';
|
||||||
|
import {
|
||||||
|
ProvidersComponent,
|
||||||
|
Provider1Component,
|
||||||
|
Provider3Component,
|
||||||
|
Provider4Component,
|
||||||
|
Provider5Component,
|
||||||
|
Provider6aComponent,
|
||||||
|
Provider6bComponent,
|
||||||
|
Provider7Component,
|
||||||
|
Provider8Component,
|
||||||
|
Provider9Component,
|
||||||
|
Provider10Component,
|
||||||
|
} from './providers.component';
|
||||||
|
|
||||||
// #docregion ngmodule
|
// #docregion ngmodule
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -22,7 +34,18 @@ import { UserService } from './user.service';
|
|||||||
HeroesComponent,
|
HeroesComponent,
|
||||||
HeroListComponent,
|
HeroListComponent,
|
||||||
InjectorComponent,
|
InjectorComponent,
|
||||||
TestComponent
|
TestComponent,
|
||||||
|
ProvidersComponent,
|
||||||
|
Provider1Component,
|
||||||
|
Provider3Component,
|
||||||
|
Provider4Component,
|
||||||
|
Provider5Component,
|
||||||
|
Provider6aComponent,
|
||||||
|
Provider6bComponent,
|
||||||
|
Provider7Component,
|
||||||
|
Provider8Component,
|
||||||
|
Provider9Component,
|
||||||
|
Provider10Component,
|
||||||
],
|
],
|
||||||
// #docregion ngmodule-providers
|
// #docregion ngmodule-providers
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
// #docregion bootstrap
|
// #docregion bootstrap
|
||||||
browserDynamicPlatform().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
// #enddocregion bootstrap
|
// #enddocregion bootstrap
|
||||||
|
@ -261,18 +261,6 @@ export class Provider10Component implements OnInit {
|
|||||||
<div id="p8"><provider-8></provider-8></div>
|
<div id="p8"><provider-8></provider-8></div>
|
||||||
<div id="p9"><provider-9></provider-9></div>
|
<div id="p9"><provider-9></provider-9></div>
|
||||||
<div id="p10"><provider-10></provider-10></div>
|
<div id="p10"><provider-10></provider-10></div>
|
||||||
`,
|
`
|
||||||
directives: [
|
|
||||||
Provider1Component,
|
|
||||||
Provider3Component,
|
|
||||||
Provider4Component,
|
|
||||||
Provider5Component,
|
|
||||||
Provider6aComponent,
|
|
||||||
Provider6bComponent,
|
|
||||||
Provider7Component,
|
|
||||||
Provider8Component,
|
|
||||||
Provider9Component,
|
|
||||||
Provider10Component,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class ProvidersComponent { }
|
export class ProvidersComponent { }
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
/* tslint:disable */
|
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
|
||||||
|
|
||||||
import { AppCtorComponent } from './app-ctor.component';
|
|
||||||
import { AppComponent as v1 } from './app.component.1';
|
|
||||||
import { AppComponent as v2 } from './app.component.2';
|
|
||||||
import { AppComponent as v3 } from './app.component.3';
|
|
||||||
|
|
||||||
import { AppComponent as final } from './app.component';
|
|
||||||
|
|
||||||
// pick one
|
|
||||||
// bootstrap(v1);
|
|
||||||
// bootstrap(v2);
|
|
||||||
// bootstrap(v3);
|
|
||||||
bootstrap(final);
|
|
||||||
|
|
||||||
// for doc testing
|
|
||||||
bootstrap(AppCtorComponent);
|
|
@ -11,7 +11,7 @@
|
|||||||
<!-- Polyfill(s) for older browsers -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
||||||
|
|
||||||
<script src="https://unpkg.com/zone.js@0.6.12"></script>
|
<script src="https://unpkg.com/zone.js@0.6.17"></script>
|
||||||
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
|
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
|
||||||
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
|
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
|
||||||
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
|
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
|
||||||
|
17
public/docs/_examples/homepage-tabs/ts/app/app.module.ts
Normal file
17
public/docs/_examples/homepage-tabs/ts/app/app.module.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// #docregion
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
|
import { DiDemoComponent } from './di_demo';
|
||||||
|
import { UiTabsComponent, UiPaneDirective } from './ui_tabs';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [ BrowserModule ],
|
||||||
|
declarations: [
|
||||||
|
DiDemoComponent,
|
||||||
|
UiTabsComponent,
|
||||||
|
UiPaneDirective
|
||||||
|
],
|
||||||
|
bootstrap: [ DiDemoComponent ]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
@ -1,8 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { UiTabsComponent, UiPaneDirective } from './ui_tabs';
|
|
||||||
|
|
||||||
class Detail {
|
class Detail {
|
||||||
title: string;
|
title: string;
|
||||||
text: string;
|
text: string;
|
||||||
@ -26,8 +24,7 @@ class Detail {
|
|||||||
</ui-tabs>
|
</ui-tabs>
|
||||||
<hr>
|
<hr>
|
||||||
<button class="btn" (click)="addDetail()">Add Detail</button>
|
<button class="btn" (click)="addDetail()">Add Detail</button>
|
||||||
`,
|
`
|
||||||
directives: [UiTabsComponent, UiPaneDirective]
|
|
||||||
})
|
})
|
||||||
export class DiDemoComponent {
|
export class DiDemoComponent {
|
||||||
details: Detail[] = [];
|
details: Detail[] = [];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { bootstrap } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { DiDemoComponent } from './di_demo';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
bootstrap(DiDemoComponent);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<!-- Polyfill(s) for older browsers -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
||||||
|
|
||||||
<script src="https://unpkg.com/zone.js@0.6.12"></script>
|
<script src="https://unpkg.com/zone.js@0.6.17"></script>
|
||||||
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
|
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
|
||||||
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
|
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
|
||||||
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
|
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
|
||||||
|
@ -4,13 +4,19 @@ import { BrowserModule } from '@angular/platform-browser';
|
|||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
import { TodoAppComponent } from './todo_app';
|
import { TodoAppComponent } from './todo_app';
|
||||||
|
import { TodoListComponent } from './todo_list';
|
||||||
|
import { TodoFormComponent } from './todo_form';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
FormsModule
|
FormsModule
|
||||||
],
|
],
|
||||||
declarations: [ TodoAppComponent ],
|
declarations: [
|
||||||
|
TodoAppComponent,
|
||||||
|
TodoListComponent,
|
||||||
|
TodoFormComponent
|
||||||
|
],
|
||||||
bootstrap: [ TodoAppComponent ]
|
bootstrap: [ TodoAppComponent ]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { Todo } from './todo';
|
import { Todo } from './todo';
|
||||||
import { TodoListComponent } from './todo_list';
|
|
||||||
import { TodoFormComponent } from './todo_form';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'todo-app',
|
selector: 'todo-app',
|
||||||
@ -14,8 +12,7 @@ import { TodoFormComponent } from './todo_form';
|
|||||||
|
|
||||||
<todo-list [todos]="todos"></todo-list>
|
<todo-list [todos]="todos"></todo-list>
|
||||||
<todo-form (newTask)="addTask($event)"></todo-form>`,
|
<todo-form (newTask)="addTask($event)"></todo-form>`,
|
||||||
styles: ['a { cursor: pointer; cursor: hand; }'],
|
styles: ['a { cursor: pointer; cursor: hand; }']
|
||||||
directives: [TodoListComponent, TodoFormComponent]
|
|
||||||
})
|
})
|
||||||
export class TodoAppComponent {
|
export class TodoAppComponent {
|
||||||
todos: Todo[] = [
|
todos: Todo[] = [
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<!-- Polyfill(s) for older browsers -->
|
<!-- Polyfill(s) for older browsers -->
|
||||||
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
<script src="https://unpkg.com/core-js/client/shim.min.js"></script>
|
||||||
|
|
||||||
<script src="https://unpkg.com/zone.js@0.6.12"></script>
|
<script src="https://unpkg.com/zone.js@0.6.17"></script>
|
||||||
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
|
<script src="https://unpkg.com/reflect-metadata@0.1.3"></script>
|
||||||
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
|
<script src="https://unpkg.com/systemjs@0.19.27/dist/system.src.js"></script>
|
||||||
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
|
<script src="https://unpkg.com/typescript@1.8.10/lib/typescript.js"></script>
|
||||||
|
@ -66,8 +66,8 @@ describe('Lifecycle hooks', function () {
|
|||||||
|
|
||||||
expect(titleEle.getText()).toContain('Windstorm can sing');
|
expect(titleEle.getText()).toContain('Windstorm can sing');
|
||||||
changeLogEles.count().then(function(count) {
|
changeLogEles.count().then(function(count) {
|
||||||
// Empirically 5 messages to start
|
// 3 messages to start
|
||||||
expect(count).toBeGreaterThan(4, 'should start with some messages');
|
expect(count).toEqual(3, 'should start with 3 messages');
|
||||||
logCount = count;
|
logCount = count;
|
||||||
// heroNameInputEle.sendKeys('-foo-').then(function () {
|
// heroNameInputEle.sendKeys('-foo-').then(function () {
|
||||||
return sendKeys(heroNameInputEle, '-foo-');
|
return sendKeys(heroNameInputEle, '-foo-');
|
||||||
@ -82,8 +82,7 @@ describe('Lifecycle hooks', function () {
|
|||||||
return sendKeys(powerInputEle, '-bar-');
|
return sendKeys(powerInputEle, '-bar-');
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
expect(titleEle.getText()).toContain('Windstorm-foo- can sing-bar-');
|
expect(titleEle.getText()).toContain('Windstorm-foo- can sing-bar-');
|
||||||
// 7 == 2 previously + length of '-bar-'
|
expect(changeLogEles.count()).toEqual(logCount + 6, 'should add 6 more messages');
|
||||||
expect(changeLogEles.count()).toEqual(logCount + 11, 'should add 11 more messages');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* tslint:disable:forin */
|
/* tslint:disable:forin */
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component, DoCheck, Input, OnChanges, SimpleChange, ViewChild } from '@angular/core';
|
import { Component, DoCheck, Input, ViewChild } from '@angular/core';
|
||||||
|
|
||||||
class Hero {
|
class Hero {
|
||||||
constructor(public name: string) {}
|
constructor(public name: string) {}
|
||||||
@ -21,7 +21,7 @@ class Hero {
|
|||||||
'p {background: Yellow; padding: 8px; margin-top: 8px}'
|
'p {background: Yellow; padding: 8px; margin-top: 8px}'
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class DoCheckComponent implements DoCheck, OnChanges {
|
export class DoCheckComponent implements DoCheck {
|
||||||
@Input() hero: Hero;
|
@Input() hero: Hero;
|
||||||
@Input() power: string;
|
@Input() power: string;
|
||||||
|
|
||||||
@ -66,16 +66,6 @@ export class DoCheckComponent implements DoCheck, OnChanges {
|
|||||||
}
|
}
|
||||||
// #enddocregion ng-do-check
|
// #enddocregion ng-do-check
|
||||||
|
|
||||||
// Copied from OnChangesComponent
|
|
||||||
ngOnChanges(changes: {[propertyName: string]: SimpleChange}) {
|
|
||||||
for (let propName in changes) {
|
|
||||||
let chng = changes[propName];
|
|
||||||
let cur = JSON.stringify(chng.currentValue);
|
|
||||||
let prev = JSON.stringify(chng.previousValue);
|
|
||||||
this.changeLog.push(`OnChanges: ${propName}: currentValue = ${cur}, previousValue = ${prev}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
this.changeDetected = true;
|
this.changeDetected = true;
|
||||||
this.changeLog.length = 0;
|
this.changeLog.length = 0;
|
||||||
|
@ -25,24 +25,22 @@
|
|||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.5",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.5",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
"@angular/compiler-cli": "0.5.0",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/core": "2.0.0-rc.5",
|
"@angular/forms": "2.0.0-rc.6",
|
||||||
"@angular/forms": "0.3.0",
|
"@angular/http": "2.0.0-rc.6",
|
||||||
"@angular/http": "2.0.0-rc.5",
|
"@angular/platform-browser": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser": "2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
|
"@angular/router": "3.0.0-rc.2",
|
||||||
"@angular/router": "3.0.0-rc.1",
|
"@angular/upgrade": "2.0.0-rc.6",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"angular2-in-memory-web-api": "0.0.18",
|
||||||
"@angular/upgrade": "2.0.0-rc.5",
|
|
||||||
"angular2-in-memory-web-api": "0.0.17",
|
|
||||||
"bootstrap": "^3.3.6",
|
"bootstrap": "^3.3.6",
|
||||||
"core-js": "^2.4.0",
|
"core-js": "^2.4.1",
|
||||||
"reflect-metadata": "^0.1.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.11",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"zone.js": "^0.6.12"
|
"zone.js": "^0.6.17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"angular-cli": "^1.0.0-beta.5",
|
"angular-cli": "^1.0.0-beta.5",
|
||||||
|
@ -7,23 +7,23 @@
|
|||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.5",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.5",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
"@angular/core": "2.0.0-rc.5",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/forms": "0.3.0",
|
"@angular/forms": "2.0.0-rc.6",
|
||||||
"@angular/http": "2.0.0-rc.5",
|
"@angular/http": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser": "2.0.0-rc.5",
|
"@angular/platform-browser": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
|
||||||
"@angular/router": "3.0.0-rc.1",
|
"@angular/router": "3.0.0-rc.2",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.2",
|
"@angular/router-deprecated": "2.0.0-rc.2",
|
||||||
"@angular/upgrade": "2.0.0-rc.5",
|
"@angular/upgrade": "2.0.0-rc.6",
|
||||||
|
|
||||||
"core-js": "^2.4.0",
|
"core-js": "^2.4.1",
|
||||||
"reflect-metadata": "0.1.3",
|
"reflect-metadata": "0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.11",
|
||||||
"zone.js": "0.6.12",
|
"zone.js": "0.6.17",
|
||||||
|
|
||||||
"angular2-in-memory-web-api": "0.0.15",
|
"angular2-in-memory-web-api": "0.0.18",
|
||||||
"bootstrap": "^3.3.6"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -11,24 +11,24 @@
|
|||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.5",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.5",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
"@angular/compiler-cli": "0.5.0",
|
"@angular/compiler-cli": "0.5.0",
|
||||||
"@angular/core": "2.0.0-rc.5",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/forms": "0.3.0",
|
"@angular/forms": "2.0.0-rc.6",
|
||||||
"@angular/http": "2.0.0-rc.5",
|
"@angular/http": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser": "2.0.0-rc.5",
|
"@angular/platform-browser": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
|
||||||
"@angular/router": "3.0.0-rc.1",
|
"@angular/router": "3.0.0-rc.2",
|
||||||
"@angular/upgrade": "2.0.0-rc.5",
|
"@angular/upgrade": "2.0.0-rc.6",
|
||||||
|
|
||||||
"core-js": "^2.4.0",
|
"core-js": "^2.4.1",
|
||||||
"reflect-metadata": "^0.1.3",
|
"reflect-metadata": "^0.1.3",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"rxjs": "5.0.0-beta.11",
|
||||||
"systemjs": "0.19.27",
|
"systemjs": "0.19.27",
|
||||||
"zone.js": "^0.6.12",
|
"zone.js": "^0.6.17",
|
||||||
|
|
||||||
"angular2-in-memory-web-api": "0.0.17",
|
"angular2-in-memory-web-api": "0.0.18",
|
||||||
"bootstrap": "^3.3.6"
|
"bootstrap": "^3.3.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"globalDependencies": {
|
"globalDependencies": {
|
||||||
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
|
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
|
||||||
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
|
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
|
||||||
"node": "registry:dt/node#6.0.0+20160807145350"
|
"node": "registry:dt/node#6.0.0+20160831021119"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// #docplaster
|
// #docplaster
|
||||||
// #docregion
|
// #docregion
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { DomSanitizationService, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'bypass-security',
|
selector: 'bypass-security',
|
||||||
@ -14,7 +14,7 @@ export class BypassSecurityComponent {
|
|||||||
videoUrl: SafeResourceUrl;
|
videoUrl: SafeResourceUrl;
|
||||||
|
|
||||||
// #docregion trust-url
|
// #docregion trust-url
|
||||||
constructor(private sanitizer: DomSanitizationService) {
|
constructor(private sanitizer: DomSanitizer) {
|
||||||
// javascript: URLs are dangerous if attacker controlled.
|
// javascript: URLs are dangerous if attacker controlled.
|
||||||
// Angular sanitizes them in data binding, but we can
|
// Angular sanitizes them in data binding, but we can
|
||||||
// explicitly tell Angular to trust this value:
|
// explicitly tell Angular to trust this value:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
|
||||||
import { HttpModule } from '@angular/http';
|
import { HttpModule } from '@angular/http';
|
||||||
@ -91,6 +91,6 @@ const moduleMetadata = {
|
|||||||
@NgModule(moduleMetadata)
|
@NgModule(moduleMetadata)
|
||||||
class MainModule { }
|
class MainModule { }
|
||||||
|
|
||||||
browserDynamicPlatform().bootstrapModule(MainModule);
|
platformBrowserDynamic().bootstrapModule(MainModule);
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
* Adjust as necessary for your application needs.
|
* Adjust as necessary for your application needs.
|
||||||
*/
|
*/
|
||||||
(function(global) {
|
(function(global) {
|
||||||
|
|
||||||
var ngVer = '@2.0.0-rc.5'; // lock in the angular package version; do not let it float to current!
|
|
||||||
var routerVer = '@3.0.0-rc.1'; // lock router version
|
|
||||||
var formsVer = '@0.3.0'; // lock forms version
|
|
||||||
var routerDeprecatedVer = '@2.0.0-rc.2'; // temporarily until we update all the guides
|
|
||||||
|
|
||||||
//map tells the System loader where to look for things
|
//map tells the System loader where to look for things
|
||||||
var map = {
|
var map = {
|
||||||
'app': 'app',
|
'app': 'app',
|
||||||
@ -25,7 +19,7 @@
|
|||||||
'@angular/platform-browser-dynamic': 'https://cdn.rawgit.com/angular/platform-browser-dynamic-builds/master',
|
'@angular/platform-browser-dynamic': 'https://cdn.rawgit.com/angular/platform-browser-dynamic-builds/master',
|
||||||
'@angular/router': 'https://cdn.rawgit.com/angular/router-builds/master',
|
'@angular/router': 'https://cdn.rawgit.com/angular/router-builds/master',
|
||||||
|
|
||||||
'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.6',
|
'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.11',
|
||||||
'ts': 'https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js',
|
'ts': 'https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js',
|
||||||
'typescript': 'https://unpkg.com/typescript@1.9.0-dev.20160409/lib/typescript.js',
|
'typescript': 'https://unpkg.com/typescript@1.9.0-dev.20160409/lib/typescript.js',
|
||||||
|
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
*/
|
*/
|
||||||
(function(global) {
|
(function(global) {
|
||||||
|
|
||||||
var ngVer = '@2.0.0-rc.5'; // lock in the angular package version; do not let it float to current!
|
var ngVer = '@2.0.0-rc.6'; // lock in the angular package version; do not let it float to current!
|
||||||
var routerVer = '@3.0.0-rc.1'; // lock router version
|
var routerVer = '@3.0.0-rc.2'; // lock router version
|
||||||
var formsVer = '@0.3.0'; // lock forms version
|
|
||||||
var routerDeprecatedVer = '@2.0.0-rc.2'; // temporarily until we update all the guides
|
var routerDeprecatedVer = '@2.0.0-rc.2'; // temporarily until we update all the guides
|
||||||
|
|
||||||
//map tells the System loader where to look for things
|
//map tells the System loader where to look for things
|
||||||
@ -16,10 +15,9 @@
|
|||||||
|
|
||||||
'@angular': 'https://unpkg.com/@angular', // sufficient if we didn't pin the version
|
'@angular': 'https://unpkg.com/@angular', // sufficient if we didn't pin the version
|
||||||
'@angular/router': 'https://unpkg.com/@angular/router' + routerVer,
|
'@angular/router': 'https://unpkg.com/@angular/router' + routerVer,
|
||||||
'@angular/forms': 'https://unpkg.com/@angular/forms' + formsVer,
|
|
||||||
'@angular/router-deprecated': 'https://unpkg.com/@angular/router-deprecated' + routerDeprecatedVer,
|
'@angular/router-deprecated': 'https://unpkg.com/@angular/router-deprecated' + routerDeprecatedVer,
|
||||||
'angular2-in-memory-web-api': 'https://unpkg.com/angular2-in-memory-web-api', // get latest
|
'angular2-in-memory-web-api': 'https://unpkg.com/angular2-in-memory-web-api', // get latest
|
||||||
'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.6',
|
'rxjs': 'https://unpkg.com/rxjs@5.0.0-beta.11',
|
||||||
'ts': 'https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js',
|
'ts': 'https://unpkg.com/plugin-typescript@4.0.10/lib/plugin.js',
|
||||||
'typescript': 'https://unpkg.com/typescript@1.9.0-dev.20160409/lib/typescript.js',
|
'typescript': 'https://unpkg.com/typescript@1.9.0-dev.20160409/lib/typescript.js',
|
||||||
};
|
};
|
||||||
@ -35,6 +33,7 @@
|
|||||||
'common',
|
'common',
|
||||||
'compiler',
|
'compiler',
|
||||||
'core',
|
'core',
|
||||||
|
'forms',
|
||||||
'http',
|
'http',
|
||||||
'platform-browser',
|
'platform-browser',
|
||||||
'platform-browser-dynamic',
|
'platform-browser-dynamic',
|
||||||
@ -48,7 +47,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Add package entries for angular packages
|
// Add package entries for angular packages
|
||||||
ngPackageNames.concat(['forms', 'router', 'router-deprecated']).forEach(function(pkgName) {
|
ngPackageNames.concat(['router', 'router-deprecated']).forEach(function(pkgName) {
|
||||||
|
|
||||||
// Bundled (~40 requests):
|
// Bundled (~40 requests):
|
||||||
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js' };
|
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js' };
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
|
|
||||||
browserDynamicPlatform().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"globalDependencies": {
|
"globalDependencies": {
|
||||||
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
|
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
|
||||||
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
|
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
|
||||||
"node": "registry:dt/node#6.0.0+20160807145350"
|
"node": "registry:dt/node#6.0.0+20160831021119"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,18 +10,17 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.5",
|
"@angular/common": "2.0.0-rc.6",
|
||||||
"@angular/compiler": "2.0.0-rc.5",
|
"@angular/compiler": "2.0.0-rc.6",
|
||||||
"@angular/core": "2.0.0-rc.5",
|
"@angular/core": "2.0.0-rc.6",
|
||||||
"@angular/forms": "0.3.0",
|
"@angular/forms": "2.0.0-rc.6",
|
||||||
"@angular/http": "2.0.0-rc.5",
|
"@angular/http": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser": "2.0.0-rc.5",
|
"@angular/platform-browser": "2.0.0-rc.6",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
|
||||||
"@angular/router": "3.0.0-rc.1",
|
"@angular/router": "3.0.0-rc.2",
|
||||||
"core-js": "^2.4.0",
|
"core-js": "^2.4.1",
|
||||||
"reflect-metadata": "0.1.2",
|
"rxjs": "5.0.0-beta.11",
|
||||||
"rxjs": "5.0.0-beta.6",
|
"zone.js": "^0.6.17"
|
||||||
"zone.js": "0.6.12"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"angular2-template-loader": "^0.4.0",
|
"angular2-template-loader": "^0.4.0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"globalDependencies": {
|
"globalDependencies": {
|
||||||
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
|
"core-js": "registry:dt/core-js#0.0.0+20160725163759",
|
||||||
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
|
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
|
||||||
"node": "registry:dt/node#6.0.0+20160807145350"
|
"node": "registry:dt/node#6.0.0+20160831021119"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"icon": "home",
|
"icon": "home",
|
||||||
"title": "Angular Docs",
|
"title": "Angular Docs",
|
||||||
"menuTitle": "Docs Home",
|
"menuTitle": "Docs Home",
|
||||||
"banner": "Welcome to <b>Angular in JavaScript</b>! The current Angular 2 release is <b>rc.5</b>. Please consult the <a href='https://github.com/angular/angular/blob/master/CHANGELOG.md' target='_blank'> Change Log</a> about recent enhancements, fixes, and breaking changes."
|
"banner": "Welcome to <b>Angular in JavaScript</b>! The current Angular 2 release is <b>rc.6</b>. Please consult the <a href='https://github.com/angular/angular/blob/master/CHANGELOG.md' target='_blank'> Change Log</a> about recent enhancements, fixes, and breaking changes."
|
||||||
},
|
},
|
||||||
|
|
||||||
"quickstart": {
|
"quickstart": {
|
||||||
|
@ -365,8 +365,7 @@ table(width="100%")
|
|||||||
To achieve the same effect in JavaScript, use the constructor array notation
|
To achieve the same effect in JavaScript, use the constructor array notation
|
||||||
in which the injection information precedes the constructor function itself.
|
in which the injection information precedes the constructor function itself.
|
||||||
|
|
||||||
Use the injection support functions `Attribute`, `Host`, `Optional`, `Self`, `SkipSelf`,
|
Use the injection support functions `Attribute`, `Host`, `Optional`, `Self`, `SkipSelf` to qualify dependency injection behavior.
|
||||||
`Query` and `ViewQuery` to qualify dependency injection behavior.
|
|
||||||
|
|
||||||
Use a nested array to combine injection functions.
|
Use a nested array to combine injection functions.
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ h2#bypass-security-apis Trusting Safe Values
|
|||||||
introduce a security vulnerability into your application. If in doubt, find a professional
|
introduce a security vulnerability into your application. If in doubt, find a professional
|
||||||
security reviewer.
|
security reviewer.
|
||||||
|
|
||||||
You can mark a value as trusted by injecting `DomSanitizationService`, and calling one of the
|
You can mark a value as trusted by injecting `DomSanitizer`, and calling one of the
|
||||||
following methods.
|
following methods.
|
||||||
|
|
||||||
* `bypassSecurityTrustHtml`
|
* `bypassSecurityTrustHtml`
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"icon": "home",
|
"icon": "home",
|
||||||
"title": "Angular Docs",
|
"title": "Angular Docs",
|
||||||
"menuTitle": "Docs Home",
|
"menuTitle": "Docs Home",
|
||||||
"banner": "Welcome to <b>Angular in TypeScript</b>! The current Angular 2 release is <b>rc.5</b>. Please consult the <a href='https://github.com/angular/angular/blob/master/CHANGELOG.md' target='_blank'> Change Log</a> about recent enhancements, fixes, and breaking changes."
|
"banner": "Welcome to <b>Angular in TypeScript</b>! The current Angular 2 release is <b>rc.6</b>. Please consult the <a href='https://github.com/angular/angular/blob/master/CHANGELOG.md' target='_blank'> Change Log</a> about recent enhancements, fixes, and breaking changes."
|
||||||
},
|
},
|
||||||
|
|
||||||
"cli-quickstart": {
|
"cli-quickstart": {
|
||||||
|
@ -69,7 +69,7 @@ figure
|
|||||||
|
|
||||||
:marked
|
:marked
|
||||||
We now have an animation defined but it is not yet used anywhere. We can change that by
|
We now have an animation defined but it is not yet used anywhere. We can change that by
|
||||||
attaching it to one or more elements in the component's template using the "`@triggerName`"
|
attaching it to one or more elements in the component's template using the "`[@triggerName]`"
|
||||||
syntax:
|
syntax:
|
||||||
|
|
||||||
+makeExample('animations/ts/app/hero-list-basic.component.ts', 'template')(format=".")
|
+makeExample('animations/ts/app/hero-list-basic.component.ts', 'template')(format=".")
|
||||||
|
@ -157,7 +157,7 @@ h2#bypass-security-apis Trusting Safe Values
|
|||||||
introduce a security vulnerability into your application. If in doubt, find a professional
|
introduce a security vulnerability into your application. If in doubt, find a professional
|
||||||
security reviewer.
|
security reviewer.
|
||||||
|
|
||||||
You can mark a value as trusted by injecting `DomSanitizationService`, and calling one of the
|
You can mark a value as trusted by injecting `DomSanitizer`, and calling one of the
|
||||||
following methods.
|
following methods.
|
||||||
|
|
||||||
* `bypassSecurityTrustHtml`
|
* `bypassSecurityTrustHtml`
|
||||||
|
@ -41,7 +41,7 @@ var _rxData = [
|
|||||||
{
|
{
|
||||||
pattern: 'script',
|
pattern: 'script',
|
||||||
from: 'node_modules/zone.js/dist/zone.js',
|
from: 'node_modules/zone.js/dist/zone.js',
|
||||||
to: 'https://unpkg.com/zone.js@0.6.12?main=browser'
|
to: 'https://unpkg.com/zone.js@0.6.17?main=browser'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: 'script',
|
pattern: 'script',
|
||||||
@ -51,7 +51,7 @@ var _rxData = [
|
|||||||
{
|
{
|
||||||
pattern: 'script',
|
pattern: 'script',
|
||||||
from: 'node_modules/rxjs/bundles/Rx.umd.js',
|
from: 'node_modules/rxjs/bundles/Rx.umd.js',
|
||||||
to: 'https://unpkg.com/rxjs@5.0.0-beta.6/bundles/Rx.umd.js'
|
to: 'https://unpkg.com/rxjs@5.0.0-beta.11/bundles/Rx.umd.js'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: 'script',
|
pattern: 'script',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user