Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Commit 26940a5

Browse files
committed
Merge remote-tracking branch 'angulario/master'
2 parents 2a2fac5 + 2c8a798 commit 26940a5

File tree

157 files changed

+4580
-2493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+4580
-2493
lines changed

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ gulp.task('add-example-boilerplate', function(done) {
441441
// copies boilerplate files to locations
442442
// where an example app is found
443443
gulp.task('_copy-example-boilerplate', function (done) {
444-
if (!argv.fast) buildStyles(copyExampleBoilerplate, done);
444+
return argv.fast ? done() : buildStyles(copyExampleBoilerplate, done);
445445
});
446446

447447
//Builds Angular 2 Docs CSS file from Bootstrap npm LESS source

public/_includes/_util-fns.jade

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ mixin makeExample(_filePath, region, _title, stylePatterns)
9898
//- ending is given or is just (), then the title will be suffixed with
9999
//- either "(excerpt)", or "(#{_region})" when _region is defined.
100100
mixin makeExcerpt(_filePath, _region, _title, stylePatterns)
101-
- var matches = _filePath.match(/(.*)\s+\(([\w ]*)\)$/);
101+
- var matches = _filePath.match(/(.*)\s+\(([^\)]*)\)$/);
102102
- var parenText;
103103
- if (matches) { _filePath = matches[1]; parenText = matches[2]; }
104104
- var adjustments = adjustExamplePathAndTitle({filePath:_filePath, title:_title});
105105
- var filePath = adjustments.filePath;
106106
- var title = adjustments.title;
107-
- var region = _region || parenText;
108-
- var excerpt = !region || parenText === '' ? 'excerpt' : parenText || region;
107+
- var region = _region || (_region === '' ? '' : parenText);
108+
- var excerpt = parenText || region || 'excerpt';
109109
- if (title) title = title + ' (' + excerpt + ')';
110110
+makeExample(filePath, region, title, stylePatterns)(format='.')
111111

@@ -222,8 +222,8 @@ script.
222222
- // E.g. of a project relative path is 'app/main.ts'
223223
- if (ex.title === null || ex.title === undefined) {
224224
- // Title is not given so take it to be ex.filePath.
225-
- // Is title like styles.1.css? Then drop the '.1' qualifier:
226-
- var matches = ex.filePath.match(/^(.*)\.\d(\.\w+)$/);
225+
- // Title like styles.1.css or foo_1.dart? Then drop the '.1' or '_1' qualifier:
226+
- var matches = ex.filePath.match(/^(.*)[\._]\d(\.\w+)$/);
227227
- ex.title = matches ? matches[1] + matches[2] : ex.filePath;
228228
- }
229229
- ex.filePath = getExampleName() + '/' + _docsFor + '/' + ex.filePath;

public/docs/_examples/architecture/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/attribute-directives/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.module.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22
import { NgModule } from '@angular/core';
33
import { BrowserModule } from '@angular/platform-browser';
44
import { FormsModule } from '@angular/forms';
5-
import { RouterModule } from '@angular/router';
65

76
import { AppComponent } from './app.component';
87
import { MovieListComponent } from './movie-list.component';
9-
import { routes } from './app.routes';
8+
import { routing } from './app.routing';
109

1110
@NgModule({
1211
imports: [
1312
BrowserModule,
1413
FormsModule,
15-
RouterModule.forRoot(routes, {})
14+
routing
1615
],
1716
declarations: [
1817
AppComponent,

public/docs/_examples/cb-a1-a2-quick-reference/ts/app/app.routes.ts

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// #docregion
2+
import { ModuleWithProviders } from '@angular/core';
3+
import { Routes, RouterModule } from '@angular/router';
4+
5+
import { MovieListComponent } from './movie-list.component';
6+
7+
const routes: Routes = [
8+
{ path: '', redirectTo: '/movies', pathMatch: 'full' },
9+
{ path: 'movies', component: MovieListComponent }
10+
];
11+
12+
export const routing: ModuleWithProviders = RouterModule.forRoot(routes);
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// #docregion
22
import { BrowserModule } from '@angular/platform-browser';
33
import { FormsModule } from '@angular/forms';
4-
import { XHRBackend } from '@angular/http';
5-
// import { appRouterProviders } from './app.routes';
4+
import { HttpModule } from '@angular/http';
5+
6+
/* import { routing } from './app.routing';*/
67
import { LocationStrategy,
78
HashLocationStrategy } from '@angular/common';
89
import { NgModule } from '@angular/core';
910

1011
import { HeroData } from './hero-data';
11-
import { InMemoryBackendService,
12-
SEED_DATA } from 'angular2-in-memory-web-api';
12+
import { InMemoryWebApiModule } from 'angular2-in-memory-web-api';
13+
1314

1415
import { AppComponent } from './app.component';
1516
import { HeroBioComponent } from './hero-bio.component';
@@ -31,44 +32,43 @@ import { ParentFinderComponent,
3132
BethComponent,
3233
BobComponent } from './parent-finder.component';
3334

34-
const DIRECTIVES = [
35+
const declarations = [
36+
AppComponent,
3537
HeroBiosComponent, HeroBiosAndContactsComponent, HeroBioComponent,
3638
HeroesBaseComponent, SortedHeroesComponent,
3739
HeroOfTheMonthComponent, HeroContactComponent,
3840
HighlightDirective,
3941
ParentFinderComponent,
40-
AppComponent
4142
];
4243

43-
const B_DIRECTIVES = [ BarryComponent, BethComponent, BobComponent ];
44+
const a_components = [AliceComponent, AlexComponent ];
45+
46+
const b_components = [ BarryComponent, BethComponent, BobComponent ];
4447

45-
// #docregion C_DIRECTIVES
46-
const C_DIRECTIVES = [
48+
const c_components = [
4749
CarolComponent, ChrisComponent, CraigComponent,
4850
CathyComponent
4951
];
50-
// #enddocregion C_DIRECTIVES
5152

52-
// #docregion bootstrap
5353
@NgModule({
54-
imports: [ BrowserModule, FormsModule ],
55-
declarations: [ ...DIRECTIVES,
56-
...B_DIRECTIVES,
57-
...C_DIRECTIVES,
58-
AliceComponent,
59-
AlexComponent ],
54+
imports: [
55+
BrowserModule,
56+
FormsModule,
57+
HttpModule,
58+
InMemoryWebApiModule.forRoot(HeroData)
59+
// routing TODO: add routes
60+
],
61+
declarations: [
62+
declarations,
63+
a_components,
64+
b_components,
65+
c_components,
66+
],
6067
bootstrap: [ AppComponent ],
68+
// #docregion providers
6169
providers: [
62-
// appRouterProviders, TODO: add routes
63-
{ provide: LocationStrategy, useClass: HashLocationStrategy },
64-
65-
{ provide: XHRBackend, useClass: InMemoryBackendService }, // in-mem server
66-
{ provide: SEED_DATA, useClass: HeroData } // in-mem server data
70+
{ provide: LocationStrategy, useClass: HashLocationStrategy }
6771
]
72+
// #enddocregion providers
6873
})
69-
export class AppModule {
70-
constructor() {
71-
}
72-
}
73-
// #enddocregion bootstraps
74-
74+
export class AppModule { }

public/docs/_examples/cb-dependency-injection/ts/app/app.routes.ts

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { ModuleWithProviders } from '@angular/core';
2+
import { Routes, RouterModule } from '@angular/router';
3+
4+
const routes: Routes = [];
5+
6+
export const routing: ModuleWithProviders = RouterModule.forRoot(routes);
7+
8+
export const appRoutingProviders: any[] = [
9+
10+
];

public/docs/_examples/component-styles/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/dependency-injection/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/displaying-data/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/forms/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/hierarchical-dependency-injection/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/lifecycle-hooks/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/ngmodule/ts/app/app.routing.3.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ModuleWithProviders } from '@angular/core';
12
import { Routes,
23
RouterModule } from '@angular/router';
34

@@ -7,4 +8,4 @@ export const routes: Routes = [
78
{ path: 'heroes', loadChildren: 'app/hero/hero.module.3' }
89
];
910

10-
export const routing = RouterModule.forRoot(routes);
11+
export const routing: ModuleWithProviders = RouterModule.forRoot(routes);

public/docs/_examples/ngmodule/ts/app/app.routing.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// #docregion
2+
import { ModuleWithProviders } from '@angular/core';
23
import { Routes,
34
RouterModule } from '@angular/router';
45

@@ -11,5 +12,5 @@ export const routes: Routes = [
1112
];
1213

1314
// #docregion forRoot
14-
export const routing = RouterModule.forRoot(routes);
15+
export const routing: ModuleWithProviders = RouterModule.forRoot(routes);
1516
// #enddocregion forRoot
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { ModuleWithProviders } from '@angular/core';
12
import { RouterModule } from '@angular/router';
23

34
import { ContactComponent } from './contact.component.3';
45

5-
export const routing = RouterModule.forChild([
6+
export const routing: ModuleWithProviders = RouterModule.forChild([
67
{ path: 'contact', component: ContactComponent}
78
]);
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { ModuleWithProviders } from '@angular/core';
12
import { RouterModule } from '@angular/router';
23

34
import { ContactComponent } from './contact.component';
45

56
// #docregion routing
6-
export const routing = RouterModule.forChild([
7+
export const routing: ModuleWithProviders = RouterModule.forChild([
78
{ path: 'contact', component: ContactComponent}
89
]);
910
// #enddocregion

public/docs/_examples/ngmodule/ts/app/crisis/crisis.routing.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ModuleWithProviders } from '@angular/core';
12
import { Routes,
23
RouterModule } from '@angular/router';
34

@@ -10,4 +11,4 @@ const routes: Routes = [
1011
{ path: ':id', component: CrisisDetailComponent }
1112
];
1213

13-
export const routing = RouterModule.forChild(routes);
14+
export const routing: ModuleWithProviders = RouterModule.forChild(routes);

public/docs/_examples/ngmodule/ts/app/hero/hero.routing.3.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ModuleWithProviders } from '@angular/core';
12
import { Routes,
23
RouterModule } from '@angular/router';
34

@@ -15,4 +16,4 @@ const routes: Routes = [
1516
}
1617
];
1718

18-
export const routing = RouterModule.forChild(routes);
19+
export const routing: ModuleWithProviders = RouterModule.forChild(routes);

public/docs/_examples/ngmodule/ts/app/hero/hero.routing.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ModuleWithProviders } from '@angular/core';
12
import { Routes,
23
RouterModule } from '@angular/router';
34

@@ -15,4 +16,4 @@ const routes: Routes = [
1516
}
1617
];
1718

18-
export const routing = RouterModule.forChild(routes);
19+
export const routing: ModuleWithProviders = RouterModule.forChild(routes);

public/docs/_examples/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@angular/router": "3.0.0-rc.1",
3636
"@angular/router-deprecated": "2.0.0-rc.2",
3737
"@angular/upgrade": "2.0.0-rc.5",
38-
"angular2-in-memory-web-api": "0.0.15",
38+
"angular2-in-memory-web-api": "0.0.17",
3939
"bootstrap": "^3.3.6",
4040
"core-js": "^2.4.0",
4141
"reflect-metadata": "^0.1.3",

public/docs/_examples/pipes/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/quickstart/dart/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 0.0.1
55
environment:
66
sdk: '>=1.13.0 <2.0.0'
77
dependencies:
8-
angular2: 2.0.0-beta.18
8+
angular2: 2.0.0-beta.20
99
browser: ^0.10.0
1010
dart_to_js_script_rewriter: ^1.0.1
1111
transformers:

public/docs/_examples/quickstart/ts/systemjs.config.1.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
// Bundled (~40 requests):
4343
function packUmd(pkgName) {
44-
packages['@angular/'+pkgName] = { main: '/bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
44+
packages['@angular/'+pkgName] = { main: 'bundles/' + pkgName + '.umd.js', defaultExtension: 'js' };
4545
}
4646

4747
// Most environments should use UMD; some (Karma) need the individual index files

public/docs/_examples/router/ts/app/app.routing.1.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// #docplaster
22
// #docregion
3+
import { ModuleWithProviders } from '@angular/core';
34
// #docregion route-config
45
import { Routes, RouterModule } from '@angular/router';
56

@@ -36,6 +37,6 @@ export const appRoutingProviders: any[] = [
3637

3738
];
3839

39-
export const routing = RouterModule.forRoot(appRoutes);
40+
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
4041
// #enddocregion route-config
4142
// #enddocregion

0 commit comments

Comments
 (0)