[Download the finished sample code](generated/zips/universal/universal.zip),
-which runs in a [node express](https://expressjs.com/) server.
+which runs in a [Node.js® Express](https://expressjs.com/) server.
@@ -123,7 +123,7 @@ You'll add more files to support building and serving with Universal.
In this example, the Angular CLI compiles and bundles the Universal version of the app with the
[AOT (Ahead-of-Time) compiler](guide/aot-compiler).
-A node/express web server turns client requests into the HTML pages rendered by Universal.
+A Node.js® Express web server turns client requests into the HTML pages rendered by Universal.
You will create:
diff --git a/aio/content/guide/visual-studio-2015.md b/aio/content/guide/visual-studio-2015.md
index ab6b594a8a307..fdb137f6bf4e1 100644
--- a/aio/content/guide/visual-studio-2015.md
+++ b/aio/content/guide/visual-studio-2015.md
@@ -53,7 +53,7 @@ if they are not already on your machine.
-**Verify that you are running node version `4.6.x` or greater, and npm `3.x.x` or greater**
+**Verify that you are running Node.js version `8.x` or greater, and npm `5.x` or greater**
by running `node -v` and `npm -v` in a terminal window.
Older versions produce errors.
diff --git a/aio/content/marketing/contributors.json b/aio/content/marketing/contributors.json
index 96d6424dd3b89..1b473f48d29c6 100644
--- a/aio/content/marketing/contributors.json
+++ b/aio/content/marketing/contributors.json
@@ -226,7 +226,7 @@
"picture": "wardbell.jpg",
"website": "https://github.com/wardbell",
"twitter": "wardbell",
- "bio": "Ward is an all-around developer with JavaScript, node, and .net chops. He's a frequent conference speaker and podcaster, trainer, Google Developer Expert for Angular, Microsoft MVP, and PluralSight author. He is also president of IdeaBlade, an enterprise software consulting firm and the makers of breeze.js. He would like to get more sleep and spend more time in the mountains.",
+ "bio": "Ward is an all-around developer with JavaScript, Node.js®, and .net chops. He's a frequent conference speaker and podcaster, trainer, Google Developer Expert for Angular, Microsoft MVP, and PluralSight author. He is also president of IdeaBlade, an enterprise software consulting firm and the makers of breeze.js. He would like to get more sleep and spend more time in the mountains.",
"group": "Angular"
},
diff --git a/aio/content/marketing/features.html b/aio/content/marketing/features.html
index da2e88309813f..e62dfd8e09961 100755
--- a/aio/content/marketing/features.html
+++ b/aio/content/marketing/features.html
@@ -45,7 +45,7 @@
diff --git a/aio/content/marketing/resources.json b/aio/content/marketing/resources.json
index 56cc02d063831..fcb84a5d9a369 100644
--- a/aio/content/marketing/resources.json
+++ b/aio/content/marketing/resources.json
@@ -202,7 +202,7 @@
"url": "https://github.com/angular/universal"
},
"c1": {
- "desc": "Lightweight development only node server",
+ "desc": "Lightweight development only Node.js® server",
"logo": "",
"rev": true,
"title": "Lite-server",
@@ -541,7 +541,7 @@
"logo": "",
"rev": true,
"title": "Egghead.io",
- "url": "https://egghead.io/technologies/angular2"
+ "url": "https://egghead.io/browse/frameworks/angular"
},
"ab5": {
"desc": "Build Web Apps with Angular - recorded video content",
diff --git a/aio/ngsw-manifest.json b/aio/ngsw-manifest.json
index 538b0ce425b93..343fe4f675e2e 100644
--- a/aio/ngsw-manifest.json
+++ b/aio/ngsw-manifest.json
@@ -18,7 +18,7 @@
"routing": {
"index": "/index.html",
"routes": {
- "^(?!/styleguide|/docs/.|(?:/guide/(?:cli-quickstart|metadata|ngmodule|service-worker-(?:getstart|comm|configref)|learning-angular)|/news)(?:\\.html|/)?$|/testing|/api/(?:.+/[^/]+-|platform-browser/AnimationDriver|testing/|api/|animate/|(?:common/(?:NgModel|Control|MaxLengthValidator))|(?:[^/]+/)?(?:NgFor(?:$|-)|AnimationStateDeclarationMetadata|CORE_DIRECTIVES|PLATFORM_PIPES|DirectiveMetadata|HTTP_PROVIDERS))|.*/stackblitz(?:\\.html)?$|.*\\.[^\/.]+$)": {
+ "^(?!/styleguide|/docs/.|(?:/guide/(?:cli-quickstart|metadata|ngmodule|service-worker-(?:getstart|comm|configref)|learning-angular)|/news)(?:\\.html|/)?$|/testing|/api/(?:.+/[^/]+-|platform-browser/AnimationDriver|testing/|api/|animate/|(?:common/(?:NgModel|Control|MaxLengthValidator))|(?:[^/]+/)?(?:NgFor(?:$|-)|AnimationStateDeclarationMetadata|CORE_DIRECTIVES|PLATFORM_PIPES|DirectiveMetadata|HTTP_PROVIDERS))|.*/stackblitz(?:\\.html)?(?:\\?.*)?$|.*\\.[^\/.]+$)": {
"match": "regex"
}
}
diff --git a/aio/package.json b/aio/package.json
index 3c98130a5aa1f..869fefa55637b 100644
--- a/aio/package.json
+++ b/aio/package.json
@@ -12,7 +12,7 @@
"aio-use-npm": "node tools/ng-packages-installer restore .",
"aio-check-local": "node tools/ng-packages-installer check .",
"ng": "yarn check-env && ng",
- "start": "yarn check-env && ng serve",
+ "start": "yarn check-env && ng serve --configuration=fast",
"build": "yarn build-for stable",
"prebuild-for": "yarn setup",
"build-for": "yarn ~~build --configuration",
@@ -126,6 +126,7 @@
"ignore": "^3.3.3",
"image-size": "^0.5.1",
"jasmine-core": "^2.8.0",
+ "jasmine-marbles": "^0.3.1",
"jasmine-spec-reporter": "^4.1.0",
"jasmine-ts": "^0.2.1",
"jsdom": "^9.12.0",
diff --git a/aio/src/styles/1-layouts/_top-menu.scss b/aio/src/styles/1-layouts/_top-menu.scss
index 71da0aaf21b8c..f83ee3e5d3a3a 100644
--- a/aio/src/styles/1-layouts/_top-menu.scss
+++ b/aio/src/styles/1-layouts/_top-menu.scss
@@ -1,6 +1,6 @@
// VARIABLES
-$hamburgerShownMargin: 0;
-$hamburgerHiddenMargin: 0 24px 0 -88px;
+$hamburgerShownMargin: 0 8px 0 0;
+$hamburgerHiddenMargin: 0 16px 0 -88px;
// DOCS PAGE / STANDARD: TOPNAV TOOLBAR FIXED
@@ -96,7 +96,6 @@ aio-shell.folder-tutorial mat-toolbar.mat-toolbar {
.nav-link.home img {
position: relative;
margin-top: -21px;
- margin-right: 20px;
top: 12px;
height: 40px;
@@ -144,6 +143,10 @@ aio-top-menu {
padding: 24px 16px;
cursor: pointer;
+ &.home{
+ margin-right: 20px;
+ }
+
&:focus {
background: rgba($white, 0.15);
border-radius: 4px;
diff --git a/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts b/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts
index 95cec6143d882..005353ee72b5d 100644
--- a/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts
+++ b/aio/tests/deployment/unit/testServiceWorkerRoutes.spec.ts
@@ -19,8 +19,14 @@ describe('service-worker routes', () => {
it('should ignore stackblitz URLs', () => {
const routes = loadSWRoutes();
+
+ // Normal StackBlitz URLs.
expect(routes.some(test => test('/generated/live-examples/toh-pt6/stackblitz.html'))).toBeFalsy();
expect(routes.some(test => test('/generated/live-examples/toh-pt6/stackblitz'))).toBeFalsy();
+
+ // Embedded StackBlitz URLs.
+ expect(routes.some(test => test('/generated/live-examples/toh-pt6/stackblitz.html?ctl=1'))).toBeFalsy();
+ expect(routes.some(test => test('/generated/live-examples/toh-pt6/stackblitz?ctl=1'))).toBeFalsy();
});
it('should ignore URLs to files with extensions', () => {
diff --git a/aio/tools/example-zipper/exampleZipper.js b/aio/tools/example-zipper/exampleZipper.js
index ae2726c3f2a44..fe90b2fa2b0f4 100644
--- a/aio/tools/example-zipper/exampleZipper.js
+++ b/aio/tools/example-zipper/exampleZipper.js
@@ -86,7 +86,7 @@ class ExampleZipper {
let alwaysIncludes = [
'bs-config.json',
'e2e/protractor.conf.js',
- '.angular-cli.json',
+ 'angular.json',
'.editorconfig',
'.gitignore',
'tslint.json',
diff --git a/aio/tools/examples/shared/boilerplate/UPDATING_CLI.md b/aio/tools/examples/shared/boilerplate/UPDATING_CLI.md
index b6edd61a12c83..8092025c3033a 100644
--- a/aio/tools/examples/shared/boilerplate/UPDATING_CLI.md
+++ b/aio/tools/examples/shared/boilerplate/UPDATING_CLI.md
@@ -22,21 +22,28 @@ Now you have a fresh application to get our new boilerplate files.
From `dummy` you can replace the following files into `aio/tools/examples/shared/boilerplate/cli`:
-* tslint.json
-* tsconfig.json
-* package.json
-* protractor.conf.js
-* karma.conf.js
* .editorconfig
-* angular-cli.json
-* src/tsconfig.spec.json
-* src/test.ts
-* src/polyfills.js
-* src/typings.d.ts
+* angular.json
+* package.json
+* tsconfig.json
+* tslint.json
+* e2e/src/app.po.ts
+* e2e/protractor.conf.js
+* e2e/tsconfig.e2e.json
* src/environments/environment.prod.ts
* src/environments/environment.ts
+* src/browserslist
+* src/favicon.ico
+* src/karma.conf.js
+* src/polyfills.js
+* src/styles.css
+* src/test.ts
+* src/tsconfig.app.json
+* src/tsconfig.spec.json
+* src/tslint.json
+* src/typings.d.ts
-### .angular-cli.json
+### angular.json
Update the `project > name` to `angular.io-example`.
@@ -44,10 +51,6 @@ Update the `project > name` to `angular.io-example`.
Update the `name` to `angular.io-example`.
-### src/polyfills.ts
-
-Uncomment the `import 'web-animations-js';` line to enable `web-animations-js` package.
-
### src/tsconfig.app.json
This file is small enough and there are a few new excludes, update by hand.
diff --git a/aio/tools/examples/shared/boilerplate/cli/.angular-cli.json b/aio/tools/examples/shared/boilerplate/cli/.angular-cli.json
deleted file mode 100644
index c30a9c8f45cc3..0000000000000
--- a/aio/tools/examples/shared/boilerplate/cli/.angular-cli.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
- "project": {
- "name": "angular.io-example"
- },
- "apps": [
- {
- "root": "src",
- "outDir": "dist",
- "assets": [
- "assets",
- "favicon.ico"
- ],
- "index": "index.html",
- "main": "main.ts",
- "polyfills": "polyfills.ts",
- "test": "test.ts",
- "tsconfig": "tsconfig.app.json",
- "testTsconfig": "tsconfig.spec.json",
- "prefix": "app",
- "styles": [
- "styles.css"
- ],
- "scripts": [],
- "environmentSource": "environments/environment.ts",
- "environments": {
- "dev": "environments/environment.ts",
- "prod": "environments/environment.prod.ts"
- }
- }
- ],
- "e2e": {
- "protractor": {
- "config": "./protractor.conf.js"
- }
- },
- "lint": [
- {
- "project": "src/tsconfig.app.json",
- "exclude": "**/node_modules/**"
- },
- {
- "project": "src/tsconfig.spec.json",
- "exclude": "**/node_modules/**"
- },
- {
- "project": "e2e/tsconfig.e2e.json",
- "exclude": "**/node_modules/**"
- }
- ],
- "test": {
- "karma": {
- "config": "./karma.conf.js"
- }
- },
- "defaults": {
- "styleExt": "css",
- "component": {}
- }
-}
diff --git a/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts b/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts
index 4b5d1b15e9146..012182efa3b9b 100644
--- a/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts
+++ b/aio/tools/examples/shared/boilerplate/cli/src/environments/environment.ts
@@ -1,7 +1,6 @@
-// The file contents for the current environment will overwrite these during build.
-// The build system defaults to the dev environment which uses `environment.ts`, but if you do
-// `ng build --env=prod` then `environment.prod.ts` will be used instead.
-// The list of which env maps to which file can be found in `.angular-cli.json`.
+// This file can be replaced during build by using the `fileReplacements` array.
+// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
+// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
diff --git a/aio/tools/stackblitz-builder/builder.js b/aio/tools/stackblitz-builder/builder.js
index 38412c525b165..a738b2eca38b3 100644
--- a/aio/tools/stackblitz-builder/builder.js
+++ b/aio/tools/stackblitz-builder/builder.js
@@ -252,7 +252,7 @@ class StackblitzBuilder {
}
var defaultIncludes = ['**/*.ts', '**/*.js', '**/*.css', '**/*.html', '**/*.md', '**/*.json', '**/*.png'];
- var boilerplateIncludes = ['src/environments/*.*', '.angular-cli.json', 'src/polyfills.ts'];
+ var boilerplateIncludes = ['src/environments/*.*', 'angular.json', 'src/polyfills.ts'];
if (config.files) {
if (config.files.length > 0) {
if (config.files[0].substr(0, 1) == '!') {
diff --git a/aio/yarn.lock b/aio/yarn.lock
index 2a8bfd56a5b7f..5360a91f40573 100644
--- a/aio/yarn.lock
+++ b/aio/yarn.lock
@@ -5846,6 +5846,12 @@ jasmine-core@^2.8.0, jasmine-core@~2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"
+jasmine-marbles@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/jasmine-marbles/-/jasmine-marbles-0.3.1.tgz#ef65edecb41b8dd62fc6bda40448222042e32043"
+ dependencies:
+ lodash "^4.5.0"
+
jasmine-spec-reporter@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz#1d632aec0341670ad324f92ba84b4b32b35e9e22"
diff --git a/integration/README.md b/integration/README.md
index ee4ab3699f75b..9367c08f2eef7 100644
--- a/integration/README.md
+++ b/integration/README.md
@@ -6,15 +6,12 @@ to work, so they allow high-fidelity reproductions of real-world issues.
For this to work, we first build the Angular distribution just like we would
publish it to npm, then install the distribution into each app.
-To test Angular CLI applications, we generate integration tests such as `cli-hello-world`.
-This was generated with a current version of the CLI, and the only modification was replacement of `@angular/*` packages with their counterparts coming from `file:../../dist/packages-dist/*`.
-When a significant change is released in the CLI, the application should be re-generated from scratch:
+To test Angular CLI applications, we use the integration test `cli-hello-world`.
+When a significant change is released in the CLI, the application should be updated with `ng update`:
```bash
$ cd integration
-$ rm -rf cli-hello-world
-$ ng new cli-hello-world
-# Edit cli-hello-world/package.json to point the @angular packages to dist/packages-dist, and preserve local mods to
+$ ng update
# ng build
# ng test
# typescript version
diff --git a/integration/cli-hello-world/angular.json b/integration/cli-hello-world/angular.json
index bc8ce2b0cc295..0e6f64e89a81a 100644
--- a/integration/cli-hello-world/angular.json
+++ b/integration/cli-hello-world/angular.json
@@ -137,6 +137,11 @@
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "cli-hello-world:serve"
+ },
+ "configurations": {
+ "production": {
+ "devServerTarget": "cli-hello-world:serve:production"
+ }
}
},
"lint": {
diff --git a/integration/cli-hello-world/e2e/app.e2e-spec.ts b/integration/cli-hello-world/e2e/app.e2e-spec.ts
index 5651a8a3a1a90..899e84d526b40 100644
--- a/integration/cli-hello-world/e2e/app.e2e-spec.ts
+++ b/integration/cli-hello-world/e2e/app.e2e-spec.ts
@@ -11,4 +11,9 @@ describe('cli-hello-world App', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
});
+
+ it('the percent pipe should work', () => {
+ page.navigateTo();
+ expect(page.getPipeContent()).toEqual('100 % awesome');
+ })
});
diff --git a/integration/cli-hello-world/e2e/app.po.ts b/integration/cli-hello-world/e2e/app.po.ts
index 82ea75ba504ab..ae3d5f7f15c74 100644
--- a/integration/cli-hello-world/e2e/app.po.ts
+++ b/integration/cli-hello-world/e2e/app.po.ts
@@ -8,4 +8,8 @@ export class AppPage {
getParagraphText() {
return element(by.css('app-root h1')).getText();
}
+
+ getPipeContent() {
+ return element(by.css('app-root p')).getText();
+ }
}
diff --git a/integration/cli-hello-world/package.json b/integration/cli-hello-world/package.json
index 27e5180488e63..58096f5b56e13 100644
--- a/integration/cli-hello-world/package.json
+++ b/integration/cli-hello-world/package.json
@@ -5,10 +5,11 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
- "build": "ng build --prod",
- "test": "ng test",
+ "build": "ng build --prod --progress false",
+ "e2e": "ng e2e",
+ "test": "ng test && ng e2e --webdriver-update=false && ng e2e --prod --webdriver-update=false",
"lint": "ng lint",
- "e2e": "ng e2e"
+ "postinstall": "webdriver-manager update --gecko false --standalone false $CHROMEDRIVER_VERSION_ARG"
},
"private": true,
"dependencies": {
@@ -27,13 +28,13 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.5.0",
- "@angular/cli": "^6.0.0-rc.0",
+ "@angular/cli": "^6.0.0-rc.5",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@angular/language-service": "file:../../dist/packages-dist/language-service",
"@types/jasmine": "~2.8.3",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
- "codelyzer": "^4.0.1",
+ "codelyzer": "^4.3.0",
"jasmine-core": "~2.8.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.0",
@@ -41,7 +42,7 @@
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
- "protractor": "~5.1.2",
+ "protractor": "file:../../node_modules/protractor",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "file:../../node_modules/typescript"
diff --git a/integration/cli-hello-world/protractor.conf.js b/integration/cli-hello-world/protractor.conf.js
index 0422074c16abe..1c07cbce63b51 100644
--- a/integration/cli-hello-world/protractor.conf.js
+++ b/integration/cli-hello-world/protractor.conf.js
@@ -9,8 +9,9 @@ exports.config = {
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
- 'browserName': 'chrome',
+ browserName: 'chrome',
chromeOptions: {
+ binary: process.env.CHROME_BIN,
args: ['--no-sandbox']
}
},
diff --git a/integration/cli-hello-world/src/app/app.component.html b/integration/cli-hello-world/src/app/app.component.html
index fa2706a406ba6..fade7834d1e2f 100644
--- a/integration/cli-hello-world/src/app/app.component.html
+++ b/integration/cli-hello-world/src/app/app.component.html
@@ -5,6 +5,7 @@
+