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

chore: update to rc6 #2177

Merged
merged 1 commit into from
Sep 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ gulp.task('build-dart-api-docs', ['_shred-api-examples', 'dartdoc'], function()
return buildApiDocsForDart();
});

// Using the --build flag will use systemjs.config.plunker.build.js (for preview builds)
gulp.task('build-plunkers', ['_copy-example-boilerplate'], function() {
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 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@shrinkOut="'in'">
[@shrinkOut]="'in'">
{{hero.name}}
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@heroState="hero.state"
[@heroState]="hero.state"
(click)="hero.toggleState()">
{{hero.name}}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@heroState="hero.state"
[@heroState]="hero.state"
(click)="hero.toggleState()">
{{hero.name}}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Heroes } from './hero.service';
<ul>
<li *ngFor="let hero of heroes"
(click)="hero.toggleState()"
@heroState="hero.state">
[@heroState]="hero.state">
{{hero.name}}
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@flyInOut="'in'">
[@flyInOut]="'in'">
{{hero.name}}
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@flyInOut="'in'">
[@flyInOut]="'in'">
{{hero.name}}
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@heroState="hero.state"
[@heroState]="hero.state"
(click)="hero.toggleState()">
{{hero.name}}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@flyInOut="'in'">
[@flyInOut]="'in'">
{{hero.name}}
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@flyInOut="'in'"
[@flyInOut]="'in'"
(click)="hero.toggleState()">
{{hero.name}}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Heroes } from './hero.service';
template: `
<ul>
<li *ngFor="let hero of heroes"
@heroState="hero.state"
[@heroState]="hero.state"
(click)="hero.toggleState()">
{{hero.name}}
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const HEROES = [
export class BackendService {
constructor(private logger: Logger) {}

getAll(type: Type): PromiseLike<any[]> {
getAll(type: Type<any>): PromiseLike<any[]> {
if (type === Hero) {
// TODO get from the database
return Promise.resolve<Hero[]>(HEROES);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NgModule } from '@angular/core';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
Expand Down Expand Up @@ -30,19 +30,25 @@ let directives: any[] = [
VoteTakerComponent
];

let schemas: any[] = [];

// Include Countdown examples
// unless in e2e tests which they break.
if (!/e2e/.test(location.search)) {
console.log('adding countdown timer examples');
directives.push(CountdownLocalVarParentComponent);
directives.push(CountdownViewChildParentComponent);
} else {
// In e2e test use CUSTOM_ELEMENTS_SCHEMA to supress unknown element errors
schemas.push(CUSTOM_ELEMENTS_SCHEMA);
}

@NgModule({
imports: [
BrowserModule
],
declarations: directives,
bootstrap: [ AppComponent ]
bootstrap: [ AppComponent ],
schemas: schemas
})
export class AppModule { }
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

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

browserDynamicPlatform().bootstrapModule(AppModule);
platformBrowserDynamic().bootstrapModule(AppModule);
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
// #docregion
import { Component } from '@angular/core';

import { SomeAbsoluteComponent, SomeRelativeComponent } from './some.component';

@Component({
selector: 'my-app',
template:
`<h1>Absolute & <i>Component-Relative</i> Paths</h1>
<absolute-path></absolute-path>
<relative-path></relative-path>
`,
directives: [SomeAbsoluteComponent, SomeRelativeComponent]
`
})
export class AppComponent {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { SomeAbsoluteComponent, SomeRelativeComponent } from './some.component';

@NgModule({
imports: [
BrowserModule
],
declarations: [
AppComponent
AppComponent,
SomeAbsoluteComponent,
SomeRelativeComponent
],
bootstrap: [ AppComponent ]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* tslint:disable:*/
// #docplaster
// #docregion
import { Component, forwardRef, Optional, provide, SkipSelf } from '@angular/core';
import { Component, forwardRef, Optional, SkipSelf } from '@angular/core';

// A component base class (see AlexComponent)
export abstract class Base { name = 'Count Basie'; }
Expand Down
4 changes: 2 additions & 2 deletions public/docs/_examples/cb-set-document-title/ts/app/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// #docregion
import { browserDynamicPlatform } from '@angular/platform-browser-dynamic';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

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

browserDynamicPlatform().bootstrapModule(AppModule);
platformBrowserDynamic().bootstrapModule(AppModule);
2 changes: 1 addition & 1 deletion public/docs/_examples/cb-ts-to-js/e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('TypeScript to Javascript tests', function () {
it('should support optional, attribute, and query injections', function () {
let app = element(by.css('hero-di-inject-additional'));
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');
app.element(by.buttonText('OK')).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,29 @@
template:
'<h1>{{titlePrefix}} {{title}}</h1>' +
'<button (click)="ok()">OK</button>' +
'<ng-content></ng-content>'
'<p>{{ msg }}</p>'
}).Class({
constructor: [
[
new ng.core.Optional(),
new ng.core.Inject('titlePrefix')
],
new ng.core.Attribute('title'),
[
new ng.core.Query('okMsg'),
ng.core.ElementRef
],
function(titlePrefix, title, msg) {
function(titlePrefix, title) {
this.titlePrefix = titlePrefix;
this.title = title;
this.msg = msg;
this.msg = '';
}
],
ok: function() {
var msgEl =
this.msg.first.nativeElement;
msgEl.textContent = 'OK!';
this.msg = 'OK!';
}
});
// #enddocregion

var AppComponent = ng.core.Component({
selector: 'hero-di-inject-additional',
template: '<hero-title title="Tour of Heroes">' +
'<span #okMsg class="ok-msg"></span>' +
'</hero-title>'
}).Class({
constructor: function() { }
Expand Down
29 changes: 13 additions & 16 deletions public/docs/_examples/cb-ts-to-js/js/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// #enddocregion appimport

// #docregion ng2import
var bootstrap =
ng.platformBrowserDynamic.bootstrap;
var platformBrowserDynamic =
ng.platformBrowserDynamic.platformBrowserDynamic;
var LocationStrategy =
ng.common.LocationStrategy;
var HashLocationStrategy =
Expand All @@ -17,20 +17,17 @@
// #enddocregion appimport

document.addEventListener('DOMContentLoaded', function() {
var platformBrowserDynamic = ng.platformBrowserDynamic.platformBrowserDynamic();

platformBrowserDynamic.bootstrapModule(app.HeroesModule);
platformBrowserDynamic.bootstrapModule(app.HeroesDslModule);
platformBrowserDynamic.bootstrapModule(app.HeroesLifecycleModule);
platformBrowserDynamic.bootstrapModule(app.HeroesDIModule);
platformBrowserDynamic.bootstrapModule(app.HeroDIInlineModule);
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectModule);
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectModule2);
platformBrowserDynamic.bootstrapModule(app.HeroesDIInjectAdditionalModule);
platformBrowserDynamic.bootstrapModule(app.HeroesIOModule);
platformBrowserDynamic.bootstrapModule(app.HeroesHostBindingsModule);

platformBrowserDynamic.bootstrapModule(app.HeroesQueriesModule);
platformBrowserDynamic().bootstrapModule(app.HeroesModule);
platformBrowserDynamic().bootstrapModule(app.HeroesDslModule);
platformBrowserDynamic().bootstrapModule(app.HeroesLifecycleModule);
platformBrowserDynamic().bootstrapModule(app.HeroesDIModule);
platformBrowserDynamic().bootstrapModule(app.HeroDIInlineModule);
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectModule);
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectModule2);
platformBrowserDynamic().bootstrapModule(app.HeroesDIInjectAdditionalModule);
platformBrowserDynamic().bootstrapModule(app.HeroesIOModule);
platformBrowserDynamic().bootstrapModule(app.HeroesHostBindingsModule);
platformBrowserDynamic().bootstrapModule(app.HeroesQueriesModule);
});

// #docregion appimport
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import {
Attribute,
Component,
ElementRef,
Inject,
Optional,
Query,
QueryList,
NgModule
} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
Expand All @@ -16,32 +13,28 @@ import { BrowserModule } from '@angular/platform-browser';
template: `
<h1>{{titlePrefix}} {{title}}</h1>
<button (click)="ok()">OK</button>
<ng-content></ng-content>
<p>{{ msg }}</p>
`
})
class TitleComponent {
private msg: string = '';
constructor(
@Inject('titlePrefix')
@Optional()
private titlePrefix: string,
@Attribute('title')
private title: string,
@Query('okMsg')
private msg: QueryList<ElementRef>) {
private title: string) {
}

ok() {
let msgEl =
this.msg.first.nativeElement;
msgEl.textContent = 'OK!';
this.msg = 'OK!';
}
}
// #enddocregion

@Component({
selector: 'hero-di-inject-additional',
template: `<hero-title title="Tour of Heroes">
<span #okMsg class="ok-msg"></span>
</hero-title>`
})
class AppComponent { }
Expand Down
5 changes: 1 addition & 4 deletions public/docs/_examples/cb-ts-to-js/ts/app/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* tslint:disable no-unused-variable */
// #docregion ng2import
import { bootstrap }
from '@angular/platform-browser-dynamic';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import {
LocationStrategy,
HashLocationStrategy
Expand All @@ -12,8 +11,6 @@ import {
import { HeroComponent } from './hero.component';
// #enddocregion appimport

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { HeroesModule } from './hero.component';
import { HeroesLifecycleModule } from './hero-lifecycle.component';
import { HeroesDIModule } from './hero-di.component';
Expand Down
Loading