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

Commit 338e9e9

Browse files
filipesilvawardbell
authored andcommitted
docs: update to Angular 4.0 (#3415)
1 parent 77af42d commit 338e9e9

Some content is hidden

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

44 files changed

+578
-132
lines changed

.travis.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ env:
1010
- DBUS_SESSION_BUS_ADDRESS=/dev/null
1111
- DISPLAY=:99.0
1212
- CHROME_BIN=chromium-browser
13-
- LATEST_RELEASE=2.4.0
14-
- LATEST_RELEASE_BRANCH=2.4.x
13+
- LATEST_RELEASE=4.0.0
14+
# Temporarily disabled until there is a new release branch for 4.0.0
15+
# - LATEST_RELEASE_BRANCH=2.4.x
1516
- TASK_FLAGS="--dgeni-log=warn"
1617
matrix:
1718
# current angular release jobs
1819
- TASK=lint
1920
- TASK="run-e2e-tests --fast" SCRIPT=examples-install.sh
2021
- TASK=build-compile SCRIPT=deploy-install.sh WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
2122
# current angular release branch jobs
22-
- TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH
23-
- TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
23+
# - TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH
24+
# - TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
2425
# angular master jobs
2526
- TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=master
2627
- TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=master WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
@@ -29,8 +30,8 @@ matrix:
2930
allow_failures:
3031
# allow current angular release branch and master to fail
3132
# these should be moved to a daily task instead of being ran on every PR
32-
- env: TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH
33-
- env: TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
33+
# - env: TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH
34+
# - env: TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=$LATEST_RELEASE_BRANCH WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
3435
- env: TASK="run-e2e-tests --fast" SCRIPT=examples-install-preview.sh PREVIEW_BRANCH=master
3536
- env: TASK=build-compile SCRIPT=deploy-install-preview.sh PREVIEW_BRANCH=master WAIT="travis_wait 50" POST_SCRIPT="check-docs.sh -v"
3637
before_install:

gulpfile.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ var _devguideShredJadeOptions = {
7171

7272
var _apiShredOptions = {
7373
lang: 'ts',
74-
examplesDir: path.join(ANGULAR_PROJECT_PATH, 'modules/@angular/examples'),
74+
examplesDir: path.join(ANGULAR_PROJECT_PATH, 'packages/examples'),
7575
fragmentsDir: path.join(DOCS_PATH, '_fragments/_api'),
7676
zipDir: path.join(RESOURCES_PATH, 'zips/api'),
7777
logLevel: _dgeniLogLevel
7878
};
7979

80-
var _excludePatterns = ['**/node_modules/**', '**/packages/**'];
80+
var _excludePatterns = ['**/node_modules/**'];
8181

8282
var _excludeMatchers = _excludePatterns.map(function(excludePattern){
8383
return new Minimatch(excludePattern)
@@ -1197,7 +1197,7 @@ function devGuideExamplesWatch(shredOptions, postShredAction, focus) {
11971197
// var excludePattern = '!' + path.join(shredOptions.examplesDir, '**/node_modules/**/*.*');
11981198
// gulp.watch([includePattern, excludePattern], {readDelay: 500}, function (event, done) {
11991199
var ignoreThese = [ '**/node_modules/**', '**/_fragments/**', '**/dist/**',
1200-
'**/dart/.pub/**', '**/dart/build/**', '**/dart/packages/**'];
1200+
'**/dart/.pub/**', '**/dart/build/**'];
12011201
ignoreThese = ignoreThese.concat(_exampleBoilerplateFiles.map((file) => `public/docs/_examples/*/*/${file}`));
12021202
var files = globby.sync( [includePattern], { ignore: ignoreThese });
12031203
gulp.watch([files], {readDelay: 500}, function (event, done) {

public/docs/_examples/_boilerplate/src/systemjs.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,20 @@
1414
'app': 'app',
1515

1616
// angular bundles
17+
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
18+
'@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
1719
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
1820
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
1921
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
2022
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
23+
'@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
2124
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
2225
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
2326
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
2427
'@angular/router/upgrade': 'npm:@angular/router/bundles/router-upgrade.umd.js',
2528
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
29+
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
30+
'@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js',
2631

2732
// other libraries
2833
'rxjs': 'npm:rxjs',

public/docs/_examples/_boilerplate/src/systemjs.config.web.build.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@
3838
'app': 'app',
3939

4040
// angular bundles
41+
'@angular/animations': 'ng:animations-builds/master/bundles/animations.umd.js',
42+
'@angular/animations/browser': 'ng:animations-builds/master/bundles/animations-browser.umd.js',
4143
'@angular/core': 'ng:core-builds/master/bundles/core.umd.js',
4244
'@angular/common': 'ng:common-builds/master/bundles/common.umd.js',
4345
'@angular/compiler': 'ng:compiler-builds/master/bundles/compiler.umd.js',
4446
'@angular/platform-browser': 'ng:platform-browser-builds/master/bundles/platform-browser.umd.js',
47+
'@angular/platform-browser/animations': 'ng:animations-builds/master/bundles/platform-browser-animations.umd.js',
4548
'@angular/platform-browser-dynamic': 'ng:platform-browser-dynamic-builds/master/bundles/platform-browser-dynamic.umd.js',
4649
'@angular/http': 'ng:http-builds/master/bundles/http.umd.js',
4750
'@angular/router': 'ng:router-builds/master/bundles/router.umd.js',
@@ -64,7 +67,7 @@
6467
'rxjs': 'npm:[email protected]',
6568
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
6669
'ts': 'npm:[email protected]/lib/plugin.js',
67-
'typescript': 'npm:typescript@2.0.10/lib/typescript.js',
70+
'typescript': 'npm:typescript@2.2.1/lib/typescript.js',
6871

6972
},
7073
// packages tells the System loader how to load when no filename and/or no extension

public/docs/_examples/_boilerplate/src/systemjs.config.web.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@
3535
'app': 'app',
3636

3737
// angular bundles
38+
'@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
39+
'@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
3840
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
3941
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
4042
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
4143
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
44+
'@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
4245
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
4346
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
4447
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
@@ -51,7 +54,7 @@
5154
'rxjs': 'npm:[email protected]',
5255
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
5356
'ts': 'npm:[email protected]/lib/plugin.js',
54-
'typescript': 'npm:typescript@2.0.10/lib/typescript.js',
57+
'typescript': 'npm:typescript@2.2.1/lib/typescript.js',
5558

5659
},
5760
// packages tells the System loader how to load when no filename and/or no extension

public/docs/_examples/animations/ts/src/app/app.module.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { NgModule } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
3+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
34

45
import { HeroTeamBuilderComponent } from './hero-team-builder.component';
56
import { HeroListBasicComponent } from './hero-list-basic.component';
@@ -14,7 +15,7 @@ import { HeroListMultistepComponent } from './hero-list-multistep.component';
1415
import { HeroListTimingsComponent } from './hero-list-timings.component';
1516

1617
@NgModule({
17-
imports: [ BrowserModule ],
18+
imports: [ BrowserModule, BrowserAnimationsModule ],
1819
declarations: [
1920
HeroTeamBuilderComponent,
2021
HeroListBasicComponent,

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import {
22
Component,
3-
Input,
3+
Input
4+
} from '@angular/core';
5+
import {
46
trigger,
57
state,
68
style,
79
animate,
810
transition
9-
} from '@angular/core';
11+
} from '@angular/animations';
1012

1113
import { Heroes } from './hero.service';
1214

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
// #docregion imports
44
import {
55
Component,
6-
Input,
6+
Input
7+
} from '@angular/core';
8+
import {
79
trigger,
810
state,
911
style,
10-
transition,
11-
animate
12-
} from '@angular/core';
12+
animate,
13+
transition
14+
} from '@angular/animations';
1315
// #enddocregion imports
1416

1517
import { Heroes } from './hero.service';

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
// #docregion imports
33
import {
44
Component,
5-
Input,
5+
Input
6+
} from '@angular/core';
7+
import {
68
trigger,
79
state,
810
style,
9-
transition,
10-
animate
11-
} from '@angular/core';
11+
animate,
12+
transition
13+
} from '@angular/animations';
1214
// #enddocregion imports
1315

1416
import { Heroes } from './hero.service';

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import {
22
Component,
3-
Input,
3+
Input
4+
} from '@angular/core';
5+
import {
46
trigger,
57
state,
68
style,
79
animate,
810
transition
9-
} from '@angular/core';
11+
} from '@angular/animations';
1012

1113
import { Heroes } from './hero.service';
1214

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import {
22
Component,
3-
Input,
3+
Input
4+
} from '@angular/core';
5+
import {
46
trigger,
57
state,
68
style,
79
animate,
810
transition
9-
} from '@angular/core';
11+
} from '@angular/animations';
1012

1113
import { Heroes } from './hero.service';
1214

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import {
22
Component,
3-
Input,
3+
Input
4+
} from '@angular/core';
5+
import {
46
trigger,
57
state,
68
style,
79
animate,
810
transition,
911
group
10-
} from '@angular/core';
12+
} from '@angular/animations';
1113

1214
import { Heroes } from './hero.service';
1315

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
import {
44
Component,
55
Input,
6+
} from '@angular/core';
7+
import {
68
trigger,
79
style,
8-
transition,
9-
animate
10-
} from '@angular/core';
10+
animate,
11+
transition
12+
} from '@angular/animations';
1113
// #enddocregion imports
1214

1315
import { Heroes } from './hero.service';

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import {
22
Component,
33
Input,
4+
} from '@angular/core';
5+
import {
46
trigger,
57
state,
68
style,
79
animate,
810
transition,
911
keyframes,
10-
AnimationTransitionEvent
11-
} from '@angular/core';
12+
AnimationEvent
13+
} from '@angular/animations';
1214

1315
import { Heroes } from './hero.service';
1416

@@ -59,11 +61,11 @@ import { Heroes } from './hero.service';
5961
export class HeroListMultistepComponent {
6062
@Input() heroes: Heroes;
6163

62-
animationStarted(event: AnimationTransitionEvent) {
64+
animationStarted(event: AnimationEvent) {
6365
console.warn('Animation started: ', event);
6466
}
6567

66-
animationDone(event: AnimationTransitionEvent) {
68+
animationDone(event: AnimationEvent) {
6769
console.warn('Animation done: ', event);
6870
}
6971
}

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import {
22
Component,
3-
Input,
3+
Input
4+
} from '@angular/core';
5+
import {
46
trigger,
57
state,
68
style,
79
animate,
810
transition
9-
} from '@angular/core';
11+
} from '@angular/animations';
1012

1113
import { Heroes } from './hero.service';
1214

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
// #docregion imports
33
import {
44
Component,
5-
Input,
5+
Input
6+
} from '@angular/core';
7+
import {
68
trigger,
79
state,
810
style,
9-
transition,
10-
animate
11-
} from '@angular/core';
11+
animate,
12+
transition
13+
} from '@angular/animations';
1214
// #enddocregion imports
1315

1416
import { Heroes } from './hero.service';

public/docs/_examples/cb-aot-compiler/e2e-spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('AOT Compilation', function () {
99
browser.get('');
1010
});
1111

12-
it('should load page and click button', function (done) {
12+
it('should load page and click button', function (done: any) {
1313
let headingSelector = element.all(by.css('h1')).get(0);
1414
expect(headingSelector.getText()).toEqual('Hello Angular');
1515

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"build": "build:babel"
3+
}

public/docs/_examples/dependency-injection/e2e-spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'use strict'; // necessary for es6 output in node
1+
'use strict'; // necessary for es6 output in node
22

33
import { browser, element, by, ElementFinder } from 'protractor';
44

@@ -163,7 +163,7 @@ describe('Dependency Injection Tests', function () {
163163

164164
describe('after button click', function() {
165165

166-
beforeAll(function (done) {
166+
beforeAll(function (done: any) {
167167
let buttonEle = element.all(by.cssContainingText('button', 'Next User')).get(0);
168168
buttonEle.click().then(done, done);
169169
});

0 commit comments

Comments
 (0)