From 56833a617162d07979797fe57f2aaeaaeaf3a6de Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Tue, 9 May 2017 22:01:04 +0200 Subject: [PATCH] docs(aio): more content fixes --- aio/content/guide/ajs-quick-reference.md | 122 ++++++++++++----------- aio/content/guide/form-validation.md | 2 +- aio/content/guide/npm-packages.md | 2 +- aio/content/guide/router.md | 6 +- aio/content/guide/testing.md | 3 +- aio/content/guide/webpack.md | 107 +++++++------------- aio/tools/transforms/helpers/utils.js | 2 +- 7 files changed, 106 insertions(+), 138 deletions(-) diff --git a/aio/content/guide/ajs-quick-reference.md b/aio/content/guide/ajs-quick-reference.md index 320d0fc3be..9e53c6a265 100644 --- a/aio/content/guide/ajs-quick-reference.md +++ b/aio/content/guide/ajs-quick-reference.md @@ -67,7 +67,7 @@ The following table lists some of the key AngularJS template features with their ### Bindings/interpolation - + Your favorite hero is: {{vm.favoriteHero}} @@ -85,7 +85,7 @@ The following table lists some of the key AngularJS template features with their ### Bindings/interpolation - + @@ -107,7 +107,7 @@ The following table lists some of the key AngularJS template features with their ### Filters - + <td>{{movie.title | uppercase}}</td> @@ -121,7 +121,7 @@ The following table lists some of the key AngularJS template features with their ### Pipes - + @@ -141,7 +141,7 @@ The following table lists some of the key AngularJS template features with their ### Local variables - + <tr ng-repeat="movie in vm.movies"> <td>{{movie.title}}</td> </tr> @@ -155,7 +155,7 @@ The following table lists some of the key AngularJS template features with their ### Input variables - + @@ -210,7 +210,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-app - + <body ng-app="movieHunter"> @@ -226,11 +226,11 @@ The following are some of the key AngularJS built-in directives and their equiva ### Bootstrapping - +
- + @@ -251,7 +251,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-class - + <div ng-class="{active: isActive}"> <div ng-class="{active: isActive, shazam: isImportant}"> @@ -272,7 +272,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ngClass - + @@ -300,7 +300,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-click - + <button ng-click="vm.toggleImage()"> <button ng-click="vm.toggleImage($event)"> @@ -318,7 +318,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### Bind to the `click` event - + @@ -351,7 +351,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-controller - + <div ng-controller="MovieListCtrl as vm"> @@ -365,7 +365,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### Component decorator - + @@ -405,7 +405,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-href - + <a ng-href="angularDocsUrl">Angular Docs</a> @@ -415,7 +415,7 @@ The following are some of the key AngularJS built-in directives and their equiva fetches from that URL. In AngularJS, the `ng-href` is often used to activate a route as part of navigation. - + <a ng-href="#movies">Movies</a> @@ -427,7 +427,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### Bind to the `href` property - + @@ -439,7 +439,7 @@ The following are some of the key AngularJS built-in directives and their equiva section of the [Template Syntax](guide/template-syntax) page. In Angular, `href` is no longer used for routing. Routing uses `routerLink`, as shown in the following example. - + @@ -457,7 +457,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-if - + <table ng-if="movies.length"> @@ -472,7 +472,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### *ngIf - + @@ -494,7 +494,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-model - + <input ng-model="vm.favoriteHero"/> @@ -507,7 +507,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ngModel - + @@ -528,7 +528,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-repeat - + <tr ng-repeat="movie in vm.movies"> @@ -543,7 +543,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### *ngFor - + @@ -569,7 +569,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-show - + <h3 ng-show="vm.favoriteHero"> Your favorite hero is: {{vm.favoriteHero}} </h3> @@ -586,7 +586,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### Bind to the `hidden` property - + @@ -611,7 +611,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-src - + <img ng-src="{{movie.imageurl}}"> @@ -625,7 +625,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### Bind to the `src` property - + @@ -645,7 +645,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-style - + <div ng-style="{color: colorPreference}"> @@ -662,7 +662,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ngStyle - + @@ -688,7 +688,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ng-switch - + <div ng-switch="vm.favoriteHero && vm.checkMovieHero(vm.favoriteHero)"> <div ng-switch-when="true"> @@ -717,7 +717,7 @@ The following are some of the key AngularJS built-in directives and their equiva ### ngSwitch - + @@ -784,7 +784,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### currency - + <td>{{movie.price | currency}}</td> @@ -796,7 +796,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### currency - + @@ -812,7 +812,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### date - + <td>{{movie.releaseDate | date}}</td> @@ -824,7 +824,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### date - + @@ -841,7 +841,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### filter - + <tr ng-repeat="movie in movieList | filter: {title:listFilter}"> @@ -865,7 +865,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### json - + <pre>{{movie | json}}</pre> @@ -877,7 +877,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### json - + @@ -893,7 +893,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### limitTo - + <tr ng-repeat="movie in movieList | limitTo:2:0"> @@ -906,7 +906,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### slice - + @@ -925,7 +925,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### lowercase - + <div>{{movie.title | lowercase}}</div> @@ -937,7 +937,7 @@ For more information on pipes, see [Pipes](guide/pipes). ### lowercase - + @@ -953,7 +953,8 @@ For more information on pipes, see [Pipes](guide/pipes). ### number - + + <td>{{movie.starRating | number}}</td> @@ -965,7 +966,8 @@ For more information on pipes, see [Pipes](guide/pipes). ### number - + + @@ -986,7 +988,8 @@ For more information on pipes, see [Pipes](guide/pipes). ### orderBy - + + <tr ng-repeat="movie in movieList | orderBy : 'title'"> @@ -1055,7 +1058,7 @@ The Angular code is shown using TypeScript. ### IIFE - + (function () { ... }()); @@ -1086,7 +1089,7 @@ The Angular code is shown using TypeScript. ### Angular modules - + angular.module("movieHunter", ["ngRoute"]); @@ -1099,7 +1102,7 @@ The Angular code is shown using TypeScript. ### Angular modules - + @@ -1120,7 +1123,8 @@ The Angular code is shown using TypeScript. ### Controller registration - + + angular .module("movieHunter") .controller("MovieListCtrl", @@ -1140,7 +1144,7 @@ The Angular code is shown using TypeScript. ### Component decorator - + @@ -1163,7 +1167,7 @@ The Angular code is shown using TypeScript. ### Controller function - + function MovieListCtrl(movieService) { } @@ -1176,7 +1180,7 @@ The Angular code is shown using TypeScript. ### Component class - + @@ -1197,7 +1201,7 @@ The Angular code is shown using TypeScript. ### Dependency injection - + MovieListCtrl.$inject = ['MovieService']; function MovieListCtrl(movieService) { } @@ -1215,7 +1219,7 @@ The Angular code is shown using TypeScript. ### Dependency injection - + @@ -1277,7 +1281,7 @@ also encapsulate a style sheet within a specific component. ### Link tag - + <link href="styles.css" rel="stylesheet" /> @@ -1290,7 +1294,7 @@ also encapsulate a style sheet within a specific component. ### Link tag - + @@ -1301,7 +1305,7 @@ also encapsulate a style sheet within a specific component. ### StyleUrls In Angular, you can use the `styles` or `styleUrls` property of the `@Component` metadata to define a style sheet for a particular component. - + diff --git a/aio/content/guide/form-validation.md b/aio/content/guide/form-validation.md index 2fe7cd0d42..315cd12941 100644 --- a/aio/content/guide/form-validation.md +++ b/aio/content/guide/form-validation.md @@ -62,7 +62,7 @@ and the [Reactive Forms](guide/reactive-forms) guides. **Try the live example to see and download the full cookbook source code.** - + diff --git a/aio/content/guide/npm-packages.md b/aio/content/guide/npm-packages.md index efde63b24e..f562189c56 100644 --- a/aio/content/guide/npm-packages.md +++ b/aio/content/guide/npm-packages.md @@ -194,7 +194,7 @@ with excellent support for Angular apps that use routing. ***[typescript](https://www.npmjs.com/package/typescript)***: the TypeScript language server, including the *tsc* TypeScript compiler. -***@types/\****: TypeScript definition files. +***@types/\* ***: TypeScript definition files. Learn more about it in the [TypeScript Configuration](guide/typescript-configuration#typings) guide. diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md index fd1710557c..194b093bb1 100644 --- a/aio/content/guide/router.md +++ b/aio/content/guide/router.md @@ -2291,13 +2291,9 @@ After these changes, the folder structure looks like this: - - are the relevant files for this version of the sample application. - - - +Here are the relevant files for this version of the sample application. diff --git a/aio/content/guide/testing.md b/aio/content/guide/testing.md index fabe063f69..5e0c7c4d47 100644 --- a/aio/content/guide/testing.md +++ b/aio/content/guide/testing.md @@ -2860,8 +2860,7 @@ Here's a summary of the stand-alone functions, in order of likely utility: The curious, dedicated reader might enjoy this lengthy blog post, - "_Tasks, microtasks, queues and schedules_". + ["_Tasks, microtasks, queues and schedules_"](https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/). diff --git a/aio/content/guide/webpack.md b/aio/content/guide/webpack.md index 30c75bd2e7..6a5e8f9709 100644 --- a/aio/content/guide/webpack.md +++ b/aio/content/guide/webpack.md @@ -109,19 +109,12 @@ It opens the `@angular/core` file and follows _its_ network of `import` statemen Then it **outputs** these files to the `app.js` _bundle file_ designated in configuration: + + output: { + filename: 'app.js' + } -
- - - output: { - filename: 'app.js' - } - - - -
- - +
This `app.js` output bundle is a single JavaScript file that contains the application source and its dependencies. You'll load it later with a `