diff --git a/aio/content/guide/animations.md b/aio/content/guide/animations.md
index e9f86a201d..b214696d0a 100644
--- a/aio/content/guide/animations.md
+++ b/aio/content/guide/animations.md
@@ -22,7 +22,7 @@ code uses [AnimationBuilder](/api/animations/AnimationBuilder). If your code doe
uncomment the `web-animations-js` polyfill from the `polyfills.ts` file generated by Angular CLI.
-
+
The examples in this page are available as a .
@@ -183,7 +183,7 @@ transition definitions, and not in a separate `state(void)` definition. Thus, th
are different on enter and leave: the element enters from the left
and leaves to the right.
-
+
These two common animations have their own aliases:
diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md
index 2bc21dc8dd..8516201de7 100644
--- a/aio/content/guide/aot-compiler.md
+++ b/aio/content/guide/aot-compiler.md
@@ -4,7 +4,7 @@ The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScri
This guide explains how to build with the AOT compiler using different compiler options and how to write Angular metadata that AOT can compile.
-
+
Watch compiler author Tobias Bosch explain the Angular Compiler at AngularConnect 2016.
@@ -39,7 +39,7 @@ For AOT compilation, append the `--aot` flags to the _build-only_ or the _build-
ng serve --aot
-
+
The `--prod` meta-flag compiles with AOT by default.
@@ -297,7 +297,7 @@ At the same time, the AOT **_collector_** analyzes the metadata recorded in the
You can think of `.metadata.json` as a diagram of the overall structure of a decorator's metadata, represented as an [abstract syntax tree (AST)](https://en.wikipedia.org/wiki/Abstract_syntax_tree).
-
+
Angular's [schema.ts](https://github.com/angular/angular/blob/master/packages/compiler-cli/src/metadata/schema.ts)
describes the JSON format as a collection of TypeScript interfaces.
@@ -333,7 +333,7 @@ Parentheses | `(a + b)`
If an expression uses unsupported syntax, the _collector_ writes an error node to the `.metadata.json` file. The compiler later reports the error if it needs that
piece of metadata to generate the application code.
-
+
If you want `ngc` to report syntax errors immediately rather than produce a `.metadata.json` file with errors, set the `strictMetadataEmit` option in `tsconfig`.
diff --git a/aio/content/guide/architecture-modules.md b/aio/content/guide/architecture-modules.md
index 055baae754..c660fb9cb8 100644
--- a/aio/content/guide/architecture-modules.md
+++ b/aio/content/guide/architecture-modules.md
@@ -26,7 +26,7 @@ Here's a simple root NgModule definition:
-
+
The `export` of `AppComponent` is just to show how to export; it isn't actually necessary in this example. A root NgModule has no reason to _export_ anything because other modules don't need to _import_ the root NgModule.
@@ -56,7 +56,7 @@ A component and its template together define a _view_. A component can contain a
When you create a component, it is associated directly with a single view, called the _host view_. The host view can be the root of a view hierarchy, which can contain _embedded views_, which are in turn the host views of other components. Those components can be in the same NgModule, or can be imported from other NgModules. Views in the tree can be nested to any depth.
-
+
The hierarchical structure of views is a key factor in the way Angular detects and responds to changes in the DOM and app data.
@@ -72,7 +72,7 @@ Other JavaScript modules use *import statements* to access public objects from o
-
@@ -99,7 +99,7 @@ In the example of the simple root module above, the application module needs mat
In this way you're using both the Angular and JavaScript module systems _together_. Although it's easy to confuse the two systems, which share the common vocabulary of "imports" and "exports", you will become familiar with the different contexts in which they are used.
-
+
Learn more from the [NgModules](guide/ngmodules) page.
diff --git a/aio/content/guide/architecture.md b/aio/content/guide/architecture.md
index e1d37bff6c..59476836a1 100644
--- a/aio/content/guide/architecture.md
+++ b/aio/content/guide/architecture.md
@@ -27,7 +27,7 @@ Like JavaScript modules, NgModules can import functionality from other NgModules
Organizing your code into distinct functional modules helps in managing development of complex applications, and in designing for reusability. In addition, this technique lets you take advantage of _lazy-loading_—that is, loading modules on demand—in order to minimize the amount of code that needs to be loaded at startup.
-
+
For a more detailed discussion, see [Introduction to modules](guide/architecture-modules).
@@ -39,7 +39,7 @@ Every Angular application has at least one component, the *root component* that
The `@Component` decorator identifies the class immediately below it as a component, and provides the template and related component-specific metadata.
-
+
Decorators are functions that modify JavaScript classes. Angular defines a number of such decorators that attach specific kinds of metadata to classes, so that it knows what those classes mean and how they should work.
@@ -59,7 +59,7 @@ Before a view is displayed, Angular evaluates the directives and resolves the bi
Your templates can also use *pipes* to improve the user experience by transforming values for display. Use pipes to display, for example, dates and currency values in a way appropriate to the user's locale. Angular provides predefined pipes for common transformations, and you can also define your own.
-
+
For a more detailed discussion of these concepts, see [Introduction to components](guide/architecture-components).
@@ -74,7 +74,7 @@ For data or logic that is not associated with a specific view, and that you want
*Dependency injection* (or DI) lets you keep your component classes lean and efficient. They don't fetch data from the server, validate user input, or log directly to the console; they delegate such tasks to services.
-
+
For a more detailed discusssion, see [Introduction to services and DI](guide/architecture-services).
@@ -96,7 +96,7 @@ The router interprets a link URL according to your app's view navigation rules a
To define navigation rules, you associate *navigation paths* with your components. A path uses a URL-like syntax that integrates your program data, in much the same way that template syntax integrates your views with your program data. You can then apply program logic to choose which views to show or to hide, in response to user input and your own access rules.
-
+
For a more detailed discussion, see [Routing and navigation](guide/router).
@@ -128,7 +128,7 @@ Each of these subjects is introduced in more detail in the following pages.
* [Pipes](guide/architecture-components#pipes)
* [Services and dependency injection](guide/architecture-services)
-
+
Note that the code referenced on these pages is available as a .
diff --git a/aio/content/guide/attribute-directives.md b/aio/content/guide/attribute-directives.md
index 6f5287627a..03c600ab97 100644
--- a/aio/content/guide/attribute-directives.md
+++ b/aio/content/guide/attribute-directives.md
@@ -51,7 +51,7 @@ ng generate directive highlight
The CLI creates `src/app/highlight.directive.ts`, a corresponding test file (`.../spec.ts`, and _declares_ the directive class in the root `AppModule`.
-
+
_Directives_ must be declared in [Angular Modules](guide/ngmodules) in the same manner as _components_.
@@ -71,7 +71,7 @@ Angular locates each element in the template that has an attribute named `appHig
The _attribute selector_ pattern explains the name of this kind of directive.
-
+
#### Why not "highlight"?
@@ -146,7 +146,7 @@ each adorned by the `HostListener` decorator.
The `@HostListener` decorator lets you subscribe to events of the DOM
element that hosts an attribute directive, the `
` in this case.
-
+
Of course you could reach into the DOM with standard JavaScript and attach event listeners manually.
There are at least three problems with _that_ approach:
diff --git a/aio/content/guide/browser-support.md b/aio/content/guide/browser-support.md
index 9c91a715d8..fea8cd245a 100644
--- a/aio/content/guide/browser-support.md
+++ b/aio/content/guide/browser-support.md
@@ -95,7 +95,7 @@ Angular supports most recent browsers. This includes the following specific vers
-
+
Angular's continuous integration process runs unit tests of the framework on all of these browsers for every pull request,
using SauceLabs and
@@ -154,7 +154,7 @@ add it yourself, following the same pattern:
1. install the npm package
1. `import` the file in `polyfills.ts`
-
+
Non-CLI users should follow the instructions [below](#non-cli).
diff --git a/aio/content/guide/component-interaction.md b/aio/content/guide/component-interaction.md
index 38f9d09b14..fd0ef1c53e 100644
--- a/aio/content/guide/component-interaction.md
+++ b/aio/content/guide/component-interaction.md
@@ -119,7 +119,7 @@ E2E tests of input property setter with empty and non-empty names:
Detect and act upon changes to input property values with the `ngOnChanges()` method of the `OnChanges` lifecycle hook interface.
-
+
@@ -311,7 +311,7 @@ The following example illustrates this technique with the same
Neither its appearance nor its behavior will change.
The child [CountdownTimerComponent](guide/component-interaction#countdown-timer-example) is the same as well.
-
+
@@ -400,7 +400,7 @@ Each `AstronautComponent` is a child of the `MissionControlComponent` and theref
-
+
diff --git a/aio/content/guide/component-styles.md b/aio/content/guide/component-styles.md
index 1d4eaca201..a5ae119cba 100644
--- a/aio/content/guide/component-styles.md
+++ b/aio/content/guide/component-styles.md
@@ -187,7 +187,7 @@ They are _not inherited_ by any components nested within the template nor by any
-
+
You can specify more than one styles file or even a combination of `styles` and `styleUrls`.
diff --git a/aio/content/guide/dependency-injection-in-action.md b/aio/content/guide/dependency-injection-in-action.md
index 358feb1cdf..8d1c222a05 100644
--- a/aio/content/guide/dependency-injection-in-action.md
+++ b/aio/content/guide/dependency-injection-in-action.md
@@ -25,7 +25,7 @@ application and don't need to be listed in any module.
Service classes can act as their own providers which is why defining them in the `@Injectable` decorator
is all the registration you need.
-
+
@@ -167,7 +167,7 @@ that is visible only to the component and its children, if any.
You could also provide the `HeroService` to a *different* component elsewhere in the application.
That would result in a *different* instance of the service, living in a *different* injector.
-
+
@@ -433,7 +433,7 @@ It may already have that value in its internal container.
If it doesn't, it may be able to make one with the help of a ***provider***.
A *provider* is a recipe for delivering a service associated with a *token*.
-
+
@@ -577,7 +577,7 @@ The second provider substitutes the `DateLoggerService` for the `LoggerService`.
The `LoggerService` is already registered at the `AppComponent` level.
When _this component_ requests the `LoggerService`, it receives the `DateLoggerService` instead.
-
+
@@ -645,7 +645,7 @@ The `HeroOfTheMonthComponent` constructor's `logger` parameter is typed as `Mini
Behind the scenes, Angular actually sets the `logger` parameter to the full service registered under the `LoggingService` token which happens to be the `DateLoggerService` that was [provided above](guide/dependency-injection-in-action#useclass).
-
+
@@ -707,7 +707,7 @@ After some undisclosed work, the function returns the string of names
and Angular injects it into the `runnersUp` parameter of the `HeroOfTheMonthComponent`.
-
+
@@ -769,7 +769,7 @@ A ***class-interface*** should define *only* the members that its consumers are
Such a narrowing interface helps decouple the concrete class from its consumers.
-
+
@@ -866,7 +866,7 @@ and displays them in the order they arrive from the database.
-
+
@@ -982,7 +982,7 @@ If you're lucky, they all implement the same base class
whose API your `NewsComponent` understands.
-
+
@@ -1165,7 +1165,7 @@ its class signature doesn't mention `Parent`:
-
+
diff --git a/aio/content/guide/dependency-injection-pattern.md b/aio/content/guide/dependency-injection-pattern.md
index d13f2baa3a..93fd0eb113 100644
--- a/aio/content/guide/dependency-injection-pattern.md
+++ b/aio/content/guide/dependency-injection-pattern.md
@@ -81,7 +81,7 @@ now in the constructor.
The `Car` class no longer creates an `engine` or `tires`.
It just consumes them.
-
+
This example leverages TypeScript's constructor syntax for declaring
parameters and properties simultaneously.
@@ -101,7 +101,7 @@ conform to the general API requirements of an `engine` or `tires`.
Now, if someone extends the `Engine` class, that is not `Car`'s problem.
-
+
The _consumer_ of `Car` has the problem. The consumer must update the car creation code to
something like this:
diff --git a/aio/content/guide/dependency-injection.md b/aio/content/guide/dependency-injection.md
index 6d29c2a0f3..b2559ab55d 100644
--- a/aio/content/guide/dependency-injection.md
+++ b/aio/content/guide/dependency-injection.md
@@ -98,7 +98,7 @@ Without a provider, the injector would not know
that it is responsible for injecting the service
nor be able to create the service.
-
+
You'll learn much more about _providers_ [below](#providers).
For now, it is sufficient to know that they configure where and how services are created.
@@ -141,7 +141,7 @@ The second registers a value (`HERO_DI_CONFIG`) under the `APP_CONFIG` _injectio
With the above registrations, Angular can inject the `UserService` or the `HERO_DI_CONFIG` value
into any class that it creates.
-
+
You'll learn about _injection tokens_ and _provider_ syntax [below](#providers).
@@ -174,7 +174,7 @@ You're likely to inject the `UserService` in many places throughout the app
and will want to inject the same service instance every time.
Providing the `UserService` with an Angular module is a good choice if an `@Injectable` provider is not an option..
-
+
To be precise, Angular module providers are registered with the root injector
_unless the module is_ [lazy loaded](guide/lazy-loading-ngmodules).
@@ -199,7 +199,7 @@ and is never destroyed so the `HeroService` created for the `HeroComponent` also
If you want to restrict `HeroService` access to the `HeroComponent` and its nested `HeroListComponent`,
providing the `HeroService` in the `HeroComponent` may be a good choice.
-
+
The scope and lifetime of component-provided services is a consequence of [the way Angular creates component instances](#component-child-injectors).
@@ -375,7 +375,7 @@ and let the injector pass them along to the factory function:
-
+
The `useFactory` field tells Angular that the provider is a factory function
whose implementation is the `heroServiceFactory`.
@@ -440,7 +440,7 @@ The service can be instantiated by configuring a factory function as shown below
-
+
To override tree-shakable providers, register the provider using the `providers: []` array syntax of any Angular decorator that supports it.
@@ -532,7 +532,7 @@ under test:
-
+
Learn more in the [Testing](guide/testing) guide.
@@ -636,7 +636,7 @@ But what should you use as the token?
You don't have a class to serve as a token.
There is no `AppConfig` class.
-
+
### TypeScript interfaces aren't valid tokens
@@ -742,7 +742,7 @@ You can call `get()` with a second parameter, which is the value to return if th
is not found. Angular can't find the service if it's not registered with this or any ancestor injector.
-
+
@@ -776,7 +776,7 @@ If you define the component before the service,
you'll get a runtime null reference error.
-
+
You actually can define the component first with the help of the `forwardRef()` method as explained
in this [blog post](http://blog.thoughtram.io/angular/2015/09/03/forward-references-in-angular-2.html).
diff --git a/aio/content/guide/deployment.md b/aio/content/guide/deployment.md
index 58b3a26c27..95e3799a2f 100644
--- a/aio/content/guide/deployment.md
+++ b/aio/content/guide/deployment.md
@@ -187,7 +187,7 @@ For example, given the ``, the browser resolves a URL such
into a server request for `my/app/some/place/foo.jpg`.
During navigation, the Angular router uses the _base href_ as the base path to component, template, and module files.
-
+
See also the [*APP_BASE_HREF*](api/common/APP_BASE_HREF "API: APP_BASE_HREF") alternative.
@@ -215,7 +215,7 @@ The `ng build` command writes generated build artifacts to the output folder.
The `ng serve` command does not.
It serves build artifacts from memory instead for a faster development experience.
-
+
The output folder is `dist/` by default.
To output to a different folder, change the `outputPath` in `angular.json`.
diff --git a/aio/content/guide/displaying-data.md b/aio/content/guide/displaying-data.md
index c5a11d6edc..6f3ba5ea45 100644
--- a/aio/content/guide/displaying-data.md
+++ b/aio/content/guide/displaying-data.md
@@ -13,7 +13,7 @@ The final UI looks like this:
-
+
@@ -60,7 +60,7 @@ interpolation:
-
+
@@ -79,7 +79,7 @@ inserts those values into the browser. Angular updates the display
when these properties change.
-
+
@@ -213,7 +213,7 @@ to the item (the hero) in the current iteration. Angular uses that variable as t
context for the interpolation in the double curly braces.
-
+
diff --git a/aio/content/guide/docs-style-guide.md b/aio/content/guide/docs-style-guide.md
index ff2d539930..48d875d8f0 100644
--- a/aio/content/guide/docs-style-guide.md
+++ b/aio/content/guide/docs-style-guide.md
@@ -47,7 +47,7 @@ The reader requests a page by its Page URL. The doc viewer fetches the correspon
Page URLs mirror the `content` file structure. The URL for the page of a guide is in the form `guide/{page-name}`. The page for _this_ "Authors Style Guide" is located at `content/guide/docs-style-guide.md` and its URL is `guide/docs-style-guide`.
-
+
_Tutorial_ pages are exactly like guide pages. The only difference is that they reside in `content/tutorial` instead of `content/guide` and have URLs like `tutorial/{page-name}`.
@@ -84,7 +84,7 @@ Standard markdown processors don't allow you to put markdown _within_ HTML tags.
```
-
+
It is customary but not required to _precede_ the _closing HTML_ tag with a blank line as well.
@@ -162,34 +162,6 @@ Try to minimize the heading depth, preferably only two. But more headings, such
Try to minimize ...
```
-## Subsections
-
-Subsections typically present extra detail and references to other pages.
-
-Use subsections for commentary that _enriches_ the reader's understanding of the text that precedes it.
-
-A subsection _must not_ contain anything _essential_ to that understanding. Don't put a critical instruction or a tutorial step in a subsection.
-
-A subsection is content within a `
` that has the `l-sub-section` CSS class. You should write the subsection content in markdown.
-
-Here is an example of a subsection `
` surrounding the subsection content written in markdown.
-
-
-
- You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
-
-
-
-```html
-
-
-You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
-
-
-```
-
-Note that at least one blank line must follow the opening `
`. A blank line before the closing `
` is customary but not required.
-
## Table of contents
Most pages display a table of contents (TOC). The TOC appears in the right panel when the viewport is wide. When narrow, the TOC appears in an expandable/collapsible region near the top of the page.
@@ -322,7 +294,7 @@ The author must also write end-to-end tests for the sample.
Code samples are located in sub-folders of the `content/examples` directory of the `angular/angular` repository. An example folder name should be the same as the guide page it supports.
-
+
A guide page might not have its own sample code. It might refer instead to a sample belonging to another page.
@@ -355,7 +327,7 @@ In this example, that path is `docs-style-guide/src/app/app.module.ts`.
You added a header to tell the reader where to find the file by setting the `title` attribute.
Following convention, you set the `title` attribute to the file's location within the sample's root folder.
-
+
Unless otherwise noted, all code snippets in this page are derived from sample source code
located in the `content/examples/docs-style-guide` directory.
@@ -523,7 +495,7 @@ The `linenums` attribute in the second pane restores line numbering for _itself
You must add special code snippet markup to sample source code files before they can be displayed by `` and `` components.
-
+
The sample source code for this page, located in `context/examples/docs-style-guide`, contains examples of every code snippet markup described in this section.
@@ -570,7 +542,7 @@ The `` and `` components won't display a source code fi
The _#docregion_ comment begins a code snippet region.
Every line of code _after_ that comment belongs in the region _until_ the code fragment processor encounters the end of the file or a closing _#enddocregion_.
-
+
The `src/main.ts` is a simple example of a file with a single _#docregion_ at the top of the file.
@@ -613,7 +585,7 @@ You can nest _#docregions_ within _#docregions_
... yet more code ...
/// #enddocregion
```
-
+
The `src/app/app.module.ts` file has a good example of a nested region.
@@ -726,7 +698,7 @@ By adding `` to the page you generate links that run sample code i
Live examples (AKA "stackblitz") are defined by one or more `stackblitz.json` files in the root of a code sample folder. Each sample folder usually has a single unnamed definition file, the default `stackblitz.json`.
-
+
You can create additional, named definition files in the form `name.stackblitz.json`. See `content/examples/testing` for examples.
@@ -826,14 +798,14 @@ Here's an embedded live example for this guide.
Every section header tag is also an anchor point. Another guide page could add a link to this section by writing:
-
+
See the ["Anchors"](guide/docs-style-guide#anchors "Style Guide - Anchors") section for details.
```html
-
+
See the ["Anchors"](guide/docs-style-guide#anchors "Style Guide - Anchors") section for details.
@@ -875,7 +847,7 @@ Now [link to that custom anchor name](#ugly-anchors) as you did before.
Now [link to that custom anchor name](#ugly-anchors) as you did before.
```
-
-## Alerts
+## Alerts and Calllouts
-Alerts draw attention to important points. Alerts should not be used for multi-line content (use callouts insteads) or stacked on top of each other. Note that the content of an alert is indented to the right by two spaces.
+Alerts and callouts present warnings, extra detail or references to other pages. They can also be used to provide commentary that _enriches_ the reader's understanding of the content being presented.
+
+An alert or callout _must not_ contain anything _essential_ to that understanding. Don't put a critical instruction or a tutorial step in a subsection.
+
+### Alerts
+
+Alerts draw attention to short important points. Alerts should not be used for multi-line content (use [callouts](#callouts "callouts") instead).
+
+
+
+ You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
+
+
+
+ Note that at least one blank line must follow both the opening and closing `
` tags. A blank line before the closing `
` is customary but not required.
+
+```html
+
+
+You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
+
+
+```
+
+There are three different _urgency levels_ used to style the alerts based on the severity or importance of the content.
+
A critical alert.
+
+
An important alert.
+
+
A helpful, informational alert.
+
Here is the markup for these alerts.
```html
+
A critical alert.
+
+
An important alert.
+
+
A helpful, informational alert.
+
```
-Alerts are meant to grab the user's attention and should be used sparingly.
-They are not for casual asides or commentary. Use [subsections](#subsections "subsections") for commentary.
+### Callouts
-## Callouts
+Callouts, like alerts, are meant to draw attention to important points. Use a callout when you want a riveting header and multi-line content.
-Callouts (like alerts) are meant to draw attention to important points. Use a callout when you want a riveting header and multi-line content.
+If you have more than two paragraphs, consider creating a new page or making it part of the main content.
+
+Callouts use the same _urgency levels_ that alerts do.
A critical point
@@ -943,7 +952,7 @@ Callouts (like alerts) are meant to draw attention to important points. Use a ca
-A helpful point
+A helpful or informational point
**Pitchfork hoodie semiotics**, roof party pop-up _paleo_ messenger bag cred Carles tousled Truffaut yr. Semiotics viral freegan VHS, Shoreditch disrupt McSweeney's. Intelligentsia kale chips Vice four dollar toast, Schlitz crucifix
@@ -959,10 +968,10 @@ Here is the markup for the first of these callouts.
```
-Notice that
-* the callout header text is forced to all upper case.
-* the callout body can be written in markdown.
-* a blank line separates the `` tag from the markdown content.
+Notice that:
+* the callout header text is forced to all upper case
+* the callout body can be written in markdown
+* a blank line separates the `` tag from the markdown content
Callouts are meant to grab the user's attention. They are not for casual asides. Please use them sparingly.
@@ -1254,7 +1263,7 @@ Note that you generally don't wrap a floating image in a `` element.
If you have a floating image inside an alert, callout, or a subsection, it is a good idea to apply the `clear-fix` class to the `div` to ensure that the image doesn't overflow its container. For example:
-
+
```html
-
+
+
diff --git a/aio/content/guide/elements.md b/aio/content/guide/elements.md
index 35b86d2370..c6982e3b75 100644
--- a/aio/content/guide/elements.md
+++ b/aio/content/guide/elements.md
@@ -11,7 +11,7 @@ The `@angular/elements` package exports a `createCustomElement()` API that provi
Transforming a component to a custom element makes all of the required Angular infrastructure available to the browser.
Creating a custom element is simple and straightforward, and automatically connects your component-defined view with change detection and data binding, mapping Angular functionality to the corresponding native HTML equivalents.
-
+
We are working on custom elements that can be used by web apps built on other frameworks.
A minimal, self-contained version of the Angular framework will be injected as a service to support the component's change-detection and data-binding functionality.
diff --git a/aio/content/guide/form-validation.md b/aio/content/guide/form-validation.md
index 5f006b61ca..858ddc0ede 100644
--- a/aio/content/guide/form-validation.md
+++ b/aio/content/guide/form-validation.md
@@ -9,7 +9,7 @@ This page shows how to validate user input in the UI and display useful validati
using both reactive and template-driven forms. It assumes some basic knowledge of the two
forms modules.
-
+
If you're new to forms, start by reviewing the [Forms](guide/forms) and
[Reactive Forms](guide/reactive-forms) guides.
@@ -51,7 +51,7 @@ but only if the `name` is invalid and the control is either `dirty` or `touched`
There are messages for `required`, `minlength`, and `forbiddenName`.
-
+
@@ -178,7 +178,7 @@ Once the `ForbiddenValidatorDirective` is ready, you can simply add its selector
-
+
You may have noticed that the custom validation directive is instantiated with `useExisting`
rather than `useClass`. The registered validator must be _this instance_ of
@@ -211,7 +211,7 @@ set the color of each form control's border.
## Cross field validation
This section shows how to perform cross field validation. It assumes some basic knowledge of creating custom validators.
-
+
If you haven't created custom validators before, start by reviewing the [custom validators section](guide/form-validation#custom-validators).
diff --git a/aio/content/guide/forms.md b/aio/content/guide/forms.md
index 66a1e36f10..7d11293445 100644
--- a/aio/content/guide/forms.md
+++ b/aio/content/guide/forms.md
@@ -29,7 +29,7 @@ You can run the in Stackblitz and download the cod
You can build forms by writing templates in the Angular [template syntax](guide/template-syntax) with
the form-specific directives and techniques described in this page.
-
+
You can also use a reactive (or model-driven) approach to build forms.
However, this page focuses on template-driven forms.
@@ -62,7 +62,7 @@ If you delete the hero name, the form displays a validation error in an attentio
Note that the *Submit* button is disabled, and the "required" bar to the left of the input control changes from green to red.
-
+
You can customize the colors and location of the "required" bar with standard CSS.
@@ -180,7 +180,7 @@ Update it with the following:
-
+
There are two changes:
@@ -208,7 +208,7 @@ Replace the contents of its template with the following:
-
+
There are only two changes.
The `template` is simply the new element tag identified by the component's `selector` property.
@@ -235,7 +235,7 @@ You added a *Submit* button at the bottom with some classes on it for styling.
*You're not using Angular yet*. There are no bindings or extra directives, just layout.
-
+
In template driven forms, if you've imported `FormsModule`, you don't have to do anything
to the `