Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit f161eb0

Browse files
filipesilvaFoxandxss
authored andcommitted
chore: update to rc6
1 parent f49b611 commit f161eb0

38 files changed

+123
-147
lines changed

public/docs/_examples/animations/ts/app/hero-list-auto.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
1717
template: `
1818
<ul>
1919
<li *ngFor="let hero of heroes"
20-
@shrinkOut="'in'">
20+
[@shrinkOut]="'in'">
2121
{{hero.name}}
2222
</li>
2323
</ul>

public/docs/_examples/animations/ts/app/hero-list-basic.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { Heroes } from './hero.service';
2727
template: `
2828
<ul>
2929
<li *ngFor="let hero of heroes"
30-
@heroState="hero.state"
30+
[@heroState]="hero.state"
3131
(click)="hero.toggleState()">
3232
{{hero.name}}
3333
</li>

public/docs/_examples/animations/ts/app/hero-list-combined-transitions.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Heroes } from './hero.service';
2020
template: `
2121
<ul>
2222
<li *ngFor="let hero of heroes"
23-
@heroState="hero.state"
23+
[@heroState]="hero.state"
2424
(click)="hero.toggleState()">
2525
{{hero.name}}
2626
</li>

public/docs/_examples/animations/ts/app/hero-list-enter-leave-states.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Heroes } from './hero.service';
1818
<ul>
1919
<li *ngFor="let hero of heroes"
2020
(click)="hero.toggleState()"
21-
@heroState="hero.state">
21+
[@heroState]="hero.state">
2222
{{hero.name}}
2323
</li>
2424
</ul>

public/docs/_examples/animations/ts/app/hero-list-enter-leave.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
1717
template: `
1818
<ul>
1919
<li *ngFor="let hero of heroes"
20-
@flyInOut="'in'">
20+
[@flyInOut]="'in'">
2121
{{hero.name}}
2222
</li>
2323
</ul>

public/docs/_examples/animations/ts/app/hero-list-groups.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
1717
template: `
1818
<ul>
1919
<li *ngFor="let hero of heroes"
20-
@flyInOut="'in'">
20+
[@flyInOut]="'in'">
2121
{{hero.name}}
2222
</li>
2323
</ul>

public/docs/_examples/animations/ts/app/hero-list-inline-styles.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Heroes } from './hero.service';
1919
template: `
2020
<ul>
2121
<li *ngFor="let hero of heroes"
22-
@heroState="hero.state"
22+
[@heroState]="hero.state"
2323
(click)="hero.toggleState()">
2424
{{hero.name}}
2525
</li>

public/docs/_examples/animations/ts/app/hero-list-multistep.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
1717
template: `
1818
<ul>
1919
<li *ngFor="let hero of heroes"
20-
@flyInOut="'in'">
20+
[@flyInOut]="'in'">
2121
{{hero.name}}
2222
</li>
2323
</ul>

public/docs/_examples/animations/ts/app/hero-list-timings.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Heroes } from './hero.service';
1616
template: `
1717
<ul>
1818
<li *ngFor="let hero of heroes"
19-
@flyInOut="'in'"
19+
[@flyInOut]="'in'"
2020
(click)="hero.toggleState()">
2121
{{hero.name}}
2222
</li>

public/docs/_examples/animations/ts/app/hero-list-twoway.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Heroes } from './hero.service';
2020
template: `
2121
<ul>
2222
<li *ngFor="let hero of heroes"
23-
@heroState="hero.state"
23+
[@heroState]="hero.state"
2424
(click)="hero.toggleState()">
2525
{{hero.name}}
2626
</li>

public/docs/_examples/architecture/ts/app/backend.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const HEROES = [
1313
export class BackendService {
1414
constructor(private logger: Logger) {}
1515

16-
getAll(type: Type): PromiseLike<any[]> {
16+
getAll(type: Type<any>): PromiseLike<any[]> {
1717
if (type === Hero) {
1818
// TODO get from the database
1919
return Promise.resolve<Hero[]>(HEROES);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
22

33
import { AppModule } from './app.module';
44

5-
browserDynamicPlatform().bootstrapModule(AppModule);
5+
platformBrowserDynamic().bootstrapModule(AppModule);
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
// #docregion
22
import { Component } from '@angular/core';
33

4-
import { SomeAbsoluteComponent, SomeRelativeComponent } from './some.component';
5-
64
@Component({
75
selector: 'my-app',
86
template:
97
`<h1>Absolute & <i>Component-Relative</i> Paths</h1>
108
<absolute-path></absolute-path>
119
<relative-path></relative-path>
12-
`,
13-
directives: [SomeAbsoluteComponent, SomeRelativeComponent]
10+
`
1411
})
1512
export class AppComponent {}

public/docs/_examples/cb-component-relative-paths/ts/app/app.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ import { NgModule } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
33

44
import { AppComponent } from './app.component';
5+
import { SomeAbsoluteComponent, SomeRelativeComponent } from './some.component';
56

67
@NgModule({
78
imports: [
89
BrowserModule
910
],
1011
declarations: [
11-
AppComponent
12+
AppComponent,
13+
SomeAbsoluteComponent,
14+
SomeRelativeComponent
1215
],
1316
bootstrap: [ AppComponent ]
1417
})

public/docs/_examples/cb-dependency-injection/ts/app/parent-finder.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/* tslint:disable:*/
33
// #docplaster
44
// #docregion
5-
import { Component, forwardRef, Optional, provide, SkipSelf } from '@angular/core';
5+
import { Component, forwardRef, Optional, SkipSelf } from '@angular/core';
66

77
// A component base class (see AlexComponent)
88
export abstract class Base { name = 'Count Basie'; }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #docregion
2-
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
2+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
33

44
import { AppModule } from './app.module';
55

6-
browserDynamicPlatform().bootstrapModule(AppModule);
6+
platformBrowserDynamic().bootstrapModule(AppModule);

public/docs/_examples/cb-ts-to-js/e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('TypeScript to Javascript tests', function () {
2525
it('should support optional, attribute, and query injections', function () {
2626
let app = element(by.css('hero-di-inject-additional'));
2727
let h1 = app.element(by.css('h1'));
28-
let okMsg = app.element(by.css('.ok-msg'));
28+
let okMsg = app.element(by.css('p'));
2929

3030
expect(h1.getText()).toBe('Tour of Heroes');
3131
app.element(by.buttonText('OK')).click();

public/docs/_examples/cb-ts-to-js/js/app/hero-di-inject-additional.component.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,29 @@
66
template:
77
'<h1>{{titlePrefix}} {{title}}</h1>' +
88
'<button (click)="ok()">OK</button>' +
9-
'<ng-content></ng-content>'
9+
'<p>{{ msg }}</p>'
1010
}).Class({
1111
constructor: [
1212
[
1313
new ng.core.Optional(),
1414
new ng.core.Inject('titlePrefix')
1515
],
1616
new ng.core.Attribute('title'),
17-
[
18-
new ng.core.Query('okMsg'),
19-
ng.core.ElementRef
20-
],
21-
function(titlePrefix, title, msg) {
17+
function(titlePrefix, title) {
2218
this.titlePrefix = titlePrefix;
2319
this.title = title;
24-
this.msg = msg;
20+
this.msg = '';
2521
}
2622
],
2723
ok: function() {
28-
var msgEl =
29-
this.msg.first.nativeElement;
30-
msgEl.textContent = 'OK!';
24+
this.msg = 'OK!';
3125
}
3226
});
3327
// #enddocregion
3428

3529
var AppComponent = ng.core.Component({
3630
selector: 'hero-di-inject-additional',
3731
template: '<hero-title title="Tour of Heroes">' +
38-
'<span #okMsg class="ok-msg"></span>' +
3932
'</hero-title>'
4033
}).Class({
4134
constructor: function() { }

public/docs/_examples/cb-ts-to-js/js/app/main.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// #enddocregion appimport
55

66
// #docregion ng2import
7-
var bootstrap =
8-
ng.platformBrowserDynamic.bootstrap;
7+
var platformBrowserDynamic =
8+
ng.platformBrowserDynamic.platformBrowserDynamic;
99
var LocationStrategy =
1010
ng.common.LocationStrategy;
1111
var HashLocationStrategy =
@@ -17,20 +17,17 @@
1717
// #enddocregion appimport
1818

1919
document.addEventListener('DOMContentLoaded', function() {
20-
var platformBrowserDynamic = ng.platformBrowserDynamic.platformBrowserDynamic();
21-
22-
platformBrowserDynamic.bootstrapModule(app.HeroesModule);
23-
platformBrowserDynamic.bootstrapModule(app.HeroesDslModule);
24-
platformBrowserDynamic.bootstrapModule(app.HeroesLifecycleModule);
25-
platformBrowserDynamic.bootstrapModule(app.HeroesDIModule);
26-
platformBrowserDynamic.bootstrapModule(app.HeroDIInlineModule);
27-
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectModule);
28-
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectModule2);
29-
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectAdditionalModule);
30-
platformBrowserDynamic.bootstrapModule(app.HeroesIOModule);
31-
platformBrowserDynamic.bootstrapModule(app.HeroesHostBindingsModule);
32-
33-
platformBrowserDynamic.bootstrapModule(app.HeroesQueriesModule);
20+
platformBrowserDynamic().bootstrapModule(app.HeroesModule);
21+
platformBrowserDynamic().bootstrapModule(app.HeroesDslModule);
22+
platformBrowserDynamic().bootstrapModule(app.HeroesLifecycleModule);
23+
platformBrowserDynamic().bootstrapModule(app.HeroesDIModule);
24+
platformBrowserDynamic().bootstrapModule(app.HeroDIInlineModule);
25+
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectModule);
26+
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectModule2);
27+
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectAdditionalModule);
28+
platformBrowserDynamic().bootstrapModule(app.HeroesIOModule);
29+
platformBrowserDynamic().bootstrapModule(app.HeroesHostBindingsModule);
30+
platformBrowserDynamic().bootstrapModule(app.HeroesQueriesModule);
3431
});
3532

3633
// #docregion appimport

public/docs/_examples/cb-ts-to-js/ts/app/hero-di-inject-additional.component.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import {
22
Attribute,
33
Component,
4-
ElementRef,
54
Inject,
65
Optional,
7-
Query,
8-
QueryList,
96
NgModule
107
} from '@angular/core';
118
import { BrowserModule } from '@angular/platform-browser';
@@ -16,32 +13,28 @@ import { BrowserModule } from '@angular/platform-browser';
1613
template: `
1714
<h1>{{titlePrefix}} {{title}}</h1>
1815
<button (click)="ok()">OK</button>
19-
<ng-content></ng-content>
16+
<p>{{ msg }}</p>
2017
`
2118
})
2219
class TitleComponent {
20+
private msg: string = '';
2321
constructor(
2422
@Inject('titlePrefix')
2523
@Optional()
2624
private titlePrefix: string,
2725
@Attribute('title')
28-
private title: string,
29-
@Query('okMsg')
30-
private msg: QueryList<ElementRef>) {
26+
private title: string) {
3127
}
3228

3329
ok() {
34-
let msgEl =
35-
this.msg.first.nativeElement;
36-
msgEl.textContent = 'OK!';
30+
this.msg = 'OK!';
3731
}
3832
}
3933
// #enddocregion
4034

4135
@Component({
4236
selector: 'hero-di-inject-additional',
4337
template: `<hero-title title="Tour of Heroes">
44-
<span #okMsg class="ok-msg"></span>
4538
</hero-title>`
4639
})
4740
class AppComponent { }

public/docs/_examples/cb-ts-to-js/ts/app/main.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* tslint:disable no-unused-variable */
22
// #docregion ng2import
3-
import { bootstrap }
4-
from '@angular/platform-browser-dynamic';
3+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
54
import {
65
LocationStrategy,
76
HashLocationStrategy
@@ -12,8 +11,6 @@ import {
1211
import { HeroComponent } from './hero.component';
1312
// #enddocregion appimport
1413

15-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
16-
1714
import { HeroesModule } from './hero.component';
1815
import { HeroesLifecycleModule } from './hero-lifecycle.component';
1916
import { HeroesDIModule } from './hero-di.component';

public/docs/_examples/dependency-injection/ts/app/app.module.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ import { HeroesComponent } from './heroes/heroes.component';
77
import { HeroListComponent } from './heroes/hero-list.component';
88
import { InjectorComponent } from './injector.component';
99
import { TestComponent } from './test.component';
10-
import { ProvidersComponent } from './providers.component';
1110
import { APP_CONFIG, HERO_DI_CONFIG } from './app.config';
1211
import { UserService } from './user.service';
12+
import {
13+
ProvidersComponent,
14+
Provider1Component,
15+
Provider3Component,
16+
Provider4Component,
17+
Provider5Component,
18+
Provider6aComponent,
19+
Provider6bComponent,
20+
Provider7Component,
21+
Provider8Component,
22+
Provider9Component,
23+
Provider10Component,
24+
} from './providers.component';
1325

1426
// #docregion ngmodule
1527
@NgModule({
@@ -22,7 +34,18 @@ import { UserService } from './user.service';
2234
HeroesComponent,
2335
HeroListComponent,
2436
InjectorComponent,
25-
TestComponent
37+
TestComponent,
38+
ProvidersComponent,
39+
Provider1Component,
40+
Provider3Component,
41+
Provider4Component,
42+
Provider5Component,
43+
Provider6aComponent,
44+
Provider6bComponent,
45+
Provider7Component,
46+
Provider8Component,
47+
Provider9Component,
48+
Provider10Component,
2649
],
2750
// #docregion ngmodule-providers
2851
providers: [
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
1+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
22
import { AppModule } from './app.module';
33

44
// #docregion bootstrap
5-
browserDynamicPlatform().bootstrapModule(AppModule);
5+
platformBrowserDynamic().bootstrapModule(AppModule);
66
// #enddocregion bootstrap

public/docs/_examples/dependency-injection/ts/app/providers.component.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -261,18 +261,6 @@ export class Provider10Component implements OnInit {
261261
<div id="p8"><provider-8></provider-8></div>
262262
<div id="p9"><provider-9></provider-9></div>
263263
<div id="p10"><provider-10></provider-10></div>
264-
`,
265-
directives: [
266-
Provider1Component,
267-
Provider3Component,
268-
Provider4Component,
269-
Provider5Component,
270-
Provider6aComponent,
271-
Provider6bComponent,
272-
Provider7Component,
273-
Provider8Component,
274-
Provider9Component,
275-
Provider10Component,
276-
],
264+
`
277265
})
278266
export class ProvidersComponent { }

0 commit comments

Comments
 (0)