docs(aio): cleanup aalert, callout, subsection use and author style (#24986)

PR Close #24986
This commit is contained in:
Stefanie Fluin
2018-07-24 08:22:14 -07:00
committed by Victor Berchet
parent d6016f1d1d
commit d523630ea2
55 changed files with 345 additions and 306 deletions
+2 -2
View File
@@ -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.
</div>
<div class="l-sub-section">
<div class="alert is-helpful">
The examples in this page are available as a <live-example></live-example>.
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
These two common animations have their own aliases:
+4 -4
View File
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful>
<a href="https://www.youtube.com/watch?v=kW9cJsvcsGo">Watch compiler author Tobias Bosch explain the Angular Compiler</a> at AngularConnect 2016.
@@ -39,7 +39,7 @@ For AOT compilation, append the `--aot` flags to the _build-only_ or the _build-
ng serve --aot
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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).
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
If you want `ngc` to report syntax errors immediately rather than produce a `.metadata.json` file with errors, set the `strictMetadataEmit` option in `tsconfig`.
+4 -4
View File
@@ -26,7 +26,7 @@ Here's a simple root NgModule definition:
<code-example path="architecture/src/app/mini-app.ts" region="module" title="src/app/app.module.ts" linenums="false"></code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
The hierarchical structure of views is a key factor in the way Angular detects and responds to changes in the DOM and app data.
</div>
@@ -72,7 +72,7 @@ Other JavaScript modules use *import statements* to access public objects from o
<code-example path="architecture/src/app/app.module.ts" region="export" linenums="false"></code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
<a href="http://exploringjs.com/es6/ch_modules.html">Learn more about the JavaScript module system on the web.</a>
</div>
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
Learn more from the [NgModules](guide/ngmodules) page.
+6 -6
View File
@@ -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_&mdash;that is, loading modules on demand&mdash;in order to minimize the amount of code that needs to be loaded at startup.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
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)
<div class="l-sub-section">
<div class="alert is-helpful">
Note that the code referenced on these pages is available as a <live-example></live-example>.
</div>
+3 -3
View File
@@ -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`.
<div class="l-sub-section">
<div class="alert is-helpful">
_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.
<div class="l-sub-section">
<div class="alert is-helpful">
#### 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 `<p>` in this case.
<div class="l-sub-section">
<div class="alert is-helpful">
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:
+2 -2
View File
@@ -95,7 +95,7 @@ Angular supports most recent browsers. This includes the following specific vers
</table>
<div class="l-sub-section">
<div class="alert is-helpful">
Angular's continuous integration process runs unit tests of the framework on all of these browsers for every pull request,
using <a href="https://saucelabs.com/">SauceLabs</a> and
@@ -154,7 +154,7 @@ add it yourself, following the same pattern:
1. install the npm package
1. `import` the file in `polyfills.ts`
<div class="l-sub-section">
<div class="alert is-helpful">
Non-CLI users should follow the instructions [below](#non-cli).
</div>
+3 -3
View File
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -400,7 +400,7 @@ Each `AstronautComponent` is a child of the `MissionControlComponent` and theref
<div class="l-sub-section">
<div class="alert is-helpful">
+1 -1
View File
@@ -187,7 +187,7 @@ They are _not inherited_ by any components nested within the template nor by any
</div>
<div class="l-sub-section">
<div class="alert is-helpful">
You can specify more than one styles file or even a combination of `styles` and `styleUrls`.
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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*.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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).
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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`.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -866,7 +866,7 @@ and displays them in the order they arrive from the database.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -982,7 +982,7 @@ If you're lucky, they all implement the same base class
whose API your `NewsComponent` understands.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1165,7 +1165,7 @@ its class signature doesn't mention `Parent`:
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -81,7 +81,7 @@ now in the constructor.
The `Car` class no longer creates an `engine` or `tires`.
It just consumes them.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
The _consumer_ of `Car` has the problem. The consumer must update the car creation code to
something like this:
+10 -10
View File
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
You'll learn about _injection tokens_ and _provider_ syntax [below](#providers).
</div>
@@ -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..
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
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:
<code-example path="dependency-injection/src/app/heroes/hero.service.provider.ts" region="provider" title="src/app/heroes/hero.service.provider.ts (excerpt)" linenums="false">
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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
<code-example path="dependency-injection/src/app/tree-shaking/service.0.ts" title="src/app/tree-shaking/service.0.ts" linenums="false"> </code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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:
<code-example path="dependency-injection/src/app/test.component.ts" region="spec" title="src/app/test.component.ts" linenums="false">
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
### 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.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -776,7 +776,7 @@ If you define the component before the service,
you'll get a runtime null reference error.
<div class="l-sub-section">
<div class="alert is-helpful">
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).
+2 -2
View File
@@ -187,7 +187,7 @@ For example, given the `<base href="/my/app/">`, 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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
The output folder is `dist/` by default.
To output to a different folder, change the `outputPath` in `angular.json`.
+4 -4
View File
@@ -13,7 +13,7 @@ The final UI looks like this:
<img src="generated/images/guide/displaying-data/final.png" alt="Final UI">
</figure>
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -60,7 +60,7 @@ interpolation:
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -79,7 +79,7 @@ inserts those values into the browser. Angular updates the display
when these properties change.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
+61 -52
View File
@@ -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`.
<div class="l-sub-section">
<div class="alert is-helpful">
_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.
</div>
```
<div class="l-sub-section">
<div class="alert is-helpful">
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 `<div>` that has the `l-sub-section` CSS class. You should write the subsection content in markdown.
Here is an example of a subsection `<div>` surrounding the subsection content written in markdown.
<div class="l-sub-section">
You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
</div>
```html
<div class="l-sub-section">
You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
</div>
```
Note that at least one blank line must follow the opening `<div>`. A blank line before the closing `</div>` 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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
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 `<code-example>` and `<code-tabs>` components.
<div class="l-sub-section">
<div class="alert is-helpful">
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 `<code-example>` and `<code-tabs>` 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_.
<div class="l-sub-section">
<div class="alert is-helpful">
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
```
<div class="l-sub-section">
<div class="alert is-helpful">
The `src/app/app.module.ts` file has a good example of a nested region.
@@ -726,7 +698,7 @@ By adding `<live-example>` 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`.
<div class="l-sub-section">
<div class="alert is-helpful">
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:
<div class="l-sub-section">
<div class="alert is-helpful">
See the ["Anchors"](guide/docs-style-guide#anchors "Style Guide - Anchors") section for details.
</div>
```html
<div class="l-sub-section">
<div class="alert is-helpful">
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.
```
<div class="l-sub-section">
<div class="alert is-helpful">
Alternatively, you can use the HTML `<a>` tag.
@@ -889,44 +861,81 @@ If you do, be sure to set the `id` attribute - not the `name` attribute! The doc
</div>
## 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).
<div class="alert is-helpful">
You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
</div>
Note that at least one blank line must follow both the opening and closing `<div>` tags. A blank line before the closing `</div>` is customary but not required.
```html
<div class="alert is-helpful">
You'll learn about styles for live examples in the [section below](guide/docs-style-guide#live-examples "Live examples").
</div>
```
There are three different _urgency levels_ used to style the alerts based on the severity or importance of the content.
<div class="alert is-critical">
A critical alert.
</div>
<div class="alert is-important">
An important alert.
</div>
<div class="alert is-helpful">
A helpful, informational alert.
</div>
Here is the markup for these alerts.
```html
<div class="alert is-critical">
A critical alert.
</div>
<div class="alert is-important">
An important alert.
</div>
<div class="alert is-helpful">
A helpful, informational alert.
</div>
```
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.
<div class="callout is-critical">
<header>A critical point</header>
@@ -943,7 +952,7 @@ Callouts (like alerts) are meant to draw attention to important points. Use a ca
</div>
<div class="callout is-helpful">
<header>A helpful point</header>
<header>A helpful or informational point</header>
**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.
</div>
```
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 `</header>` 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 `</header>` 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 `<figure>` 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:
<div class="l-sub-section clear-fix">
<div class="alert is-helpful clear-fix">
<img src="generated/images/guide/docs-style-guide/flying-hero.png"
alt="flying Angular hero"
@@ -1266,7 +1275,7 @@ If you have a floating image inside an alert, callout, or a subsection, it is a
</div>
```html
<div class="l-sub-section clear-fix">
<div class="alert is-helpful clear-fix">
<img src="generated/images/guide/docs-style-guide/flying-hero.png"
alt="flying Angular hero"
@@ -101,7 +101,7 @@ The `loadComponent()` method is doing a lot of the heavy lifting here.
Take it step by step. First, it picks an ad.
<div class="l-sub-section">
<div class="alert is-helpful">
+1 -1
View File
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
+4 -4
View File
@@ -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.
<div class="l-sub-section">
<div class="alert is-helpful">
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`.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -178,7 +178,7 @@ Once the `ForbiddenValidatorDirective` is ready, you can simply add its selector
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
If you haven't created custom validators before, start by reviewing the [custom validators section](guide/form-validation#custom-validators).
+12 -12
View File
@@ -29,7 +29,7 @@ You can run the <live-example></live-example> 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.
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
You can customize the colors and location of the "required" bar with standard CSS.
@@ -180,7 +180,7 @@ Update it with the following:
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
There are two changes:
@@ -208,7 +208,7 @@ Replace the contents of its template with the following:
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
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.
<div class="l-sub-section">
<div class="alert is-helpful">
In template driven forms, if you've imported `FormsModule`, you don't have to do anything
to the `<form>` tag in order to make use of `FormsModule`. Continue on to see how this works.
@@ -311,7 +311,7 @@ Find the `<input>` tag for *Name* and update it like this:
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
You added a diagnostic interpolation after the input tag
so you can see what you're doing.
@@ -331,7 +331,7 @@ a template variable for the form. Update the `<form>` tag with
The variable `heroForm` is now a reference to the `NgForm` directive that governs the form as a whole.
<div class="l-sub-section">
<div class="alert is-helpful">
{@a ngForm}
@@ -362,7 +362,7 @@ At some point it might look like this:
The diagnostic is evidence that values really are flowing from the input box to the model and
back again.
<div class="l-sub-section">
<div class="alert is-helpful">
That's *two-way data binding*.
For more information, see
@@ -375,7 +375,7 @@ Notice that you also added a `name` attribute to the `<input>` tag and set it to
which makes sense for the hero's name. Any unique value will do, but using a descriptive name is helpful.
Defining a `name` attribute is a requirement when using `[(ngModel)]` in combination with a form.
<div class="l-sub-section">
<div class="alert is-helpful">
Internally, Angular creates `FormControl` instances and
registers them with an `NgForm` directive that Angular attached to the `<form>` tag.
@@ -395,7 +395,7 @@ After revision, the core of the form should look like this:
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
* Each input element has an `id` property that is used by the `label` element's `for` attribute
to match the label to its input control.
@@ -571,7 +571,7 @@ Here's an example of an error message added to the _name_ input box:
You need a template reference variable to access the input box's Angular control from within the template.
Here you created a variable called `name` and gave it the value "ngModel".
<div class="l-sub-section">
<div class="alert is-helpful">
Why "ngModel"?
A directive's [exportAs](api/core/Directive) property
@@ -687,7 +687,7 @@ For you, it was as simple as this:
Submitting the form isn't terribly dramatic at the moment.
<div class="l-sub-section">
<div class="alert is-helpful">
An unsurprising observation for a demo. To be honest,
jazzing it up won't teach you anything new about forms.
@@ -24,7 +24,7 @@ An Angular application is a tree of components. Each component instance has its
The tree of components parallels the tree of injectors.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -61,7 +61,7 @@ The requests keep bubbling up until Angular finds an injector that can handle th
If it runs out of ancestors, Angular throws an error.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -196,7 +196,7 @@ Providing the service at the component level ensures that _every_ instance of th
No tax return overwriting. No mess.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -244,7 +244,7 @@ its injector produces an instance of `Car` resolved by injector (C) with an `Eng
<div class="l-sub-section">
<div class="alert is-helpful">
+4 -4
View File
@@ -497,7 +497,7 @@ and displays search results as they arrive.
A search value reaches the service only if it's a new value and the user has stopped typing.
<div class="l-sub-section">
<div class="alert is-helpful">
The `withRefresh` option is explained [below](#cache-refresh).
@@ -517,7 +517,7 @@ it cancels that request and sends a new one.
server returns them out of order.
<div class="l-sub-section">
<div class="alert is-helpful">
If you think you'll reuse this debouncing logic,
consider moving it to a utility function or into the `PackageSearchService` itself.
@@ -622,7 +622,7 @@ Then import and add it to the `AppModule` _providers array_ like this:
As you create new interceptors, add them to the `httpInterceptorProviders` array and
you won't have to revisit the `AppModule`.
<div class="l-sub-section">
<div class="alert is-helpful">
There are many more interceptors in the complete sample code.
@@ -824,7 +824,7 @@ and emits again later with the updated search results.
The _cache-then-refresh_ option is triggered by the presence of a **custom `x-refresh` header**.
<div class="l-sub-section">
<div class="alert is-helpful">
A checkbox on the `PackageSearchComponent` toggles a `withRefresh` flag,
which is one of the arguments to `PackageSearchService.search()`.
+7 -7
View File
@@ -108,7 +108,7 @@ import from `@angular/common/locales/extra`. An error message informs you when t
<code-example path="i18n/doc-files/app.locale_data_extra.ts" region="import-locale-extra" title="src/app/app.module.ts" linenums="false">
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
All locale data used by Angular are extracted from the Unicode Consortium's
<a href="http://cldr.unicode.org/" title="CLDR">Common Locale Data Repository (CLDR)</a>.
@@ -118,7 +118,7 @@ import from `@angular/common/locales/extra`. An error message informs you when t
## Template translations
<div class="l-sub-section">
<div class="alert is-helpful">
This document refers to a unit of translatable text as "text," a "message", or a
"text message."
@@ -325,7 +325,7 @@ the number of minutes.
* The third parameter defines a pluralization pattern consisting of pluralization categories and their matching values.
<div class="l-sub-section">
<div class="alert is-helpful">
This syntax conforms to the
<a href="http://userguide.icu-project.org/formatparse/messages" title="ICU Message Format">ICU Message Format</a>
@@ -352,7 +352,7 @@ Any unmatched cardinality uses `other {{{minutes}} minutes ago}`. You could choo
for two, three, or any other number if the pluralization rules were different. For the example of
"minute", only these three patterns are necessary in English.
<div class="l-sub-section">
<div class="alert is-helpful">
You can use interpolations and html markup inside of your translations.
@@ -399,7 +399,7 @@ By default, the tool generates a translation file named `messages.xlf` in the
<a href="https://en.wikipedia.org/wiki/XLIFF">XML Localization Interchange File Format
(XLIFF, version 1.2)</a>.
<div class="l-sub-section">
<div class="alert is-helpful">
If you don't use the CLI, you have two options:
* You can use the `ng-xi18n` tool directly from the `@angular/compiler-cli` package.
@@ -430,7 +430,7 @@ ng xi18n --i18n-format=xmb
The sample in this guide uses the default XLIFF 1.2 format.
<div class="l-sub-section">
<div class="alert is-helpful">
XLIFF files have the extension .xlf. The XMB format generates .xmb source files but uses
.xtb (XML Translation Bundle: XTB) translation files.
@@ -488,7 +488,7 @@ for the project structure to reflect the entire internationalization effort.
One approach is to dedicate a folder to localization and store related assets, such as
internationalization files, there.
<div class="l-sub-section">
<div class="alert is-helpful">
Localization and internationalization are
<a href="https://en.wikipedia.org/wiki/Internationalization_and_localization">different but
+7 -7
View File
@@ -300,7 +300,7 @@ The sequence of log messages follows the prescribed hook calling order:
`OnChanges`, `OnInit`, `DoCheck`&nbsp;(3x), `AfterContentInit`, `AfterContentChecked`&nbsp;(3x),
`AfterViewInit`, `AfterViewChecked`&nbsp;(3x), and `OnDestroy`.
<div class="l-sub-section">
<div class="alert is-helpful">
The constructor isn't an Angular hook *per se*.
The log confirms that input properties (the `name` property in this case) have no assigned values at construction.
@@ -323,7 +323,7 @@ Go undercover with these two spy hooks to discover when an element is initialize
This is the perfect infiltration job for a directive.
The heroes will never know they're being watched.
<div class="l-sub-section">
<div class="alert is-helpful">
Kidding aside, pay attention to two key points:
@@ -373,7 +373,7 @@ Use `ngOnInit()` for two main reasons:
Experienced developers agree that components should be cheap and safe to construct.
<div class="l-sub-section">
<div class="alert is-helpful">
Misko Hevery, Angular team lead,
[explains why](http://misko.hevery.com/code-reviewers-guide/flaw-constructor-does-real-work/)
@@ -394,7 +394,7 @@ Remember also that a directive's data-bound input properties are not set until _
That's a problem if you need to initialize the directive based on those properties.
They'll have been set when `ngOnInit()` runs.
<div class="l-sub-section">
<div class="alert is-helpful">
The `ngOnChanges()` method is your first opportunity to access those properties.
Angular calls `ngOnChanges()` before `ngOnInit()` and many times after that.
@@ -460,7 +460,7 @@ The hero object *reference* didn't change so, from Angular's perspective, there
Use the `DoCheck` hook to detect and act upon changes that Angular doesn't catch on its own.
<div class="l-sub-section">
<div class="alert is-helpful">
Use this method to detect a change that Angular overlooked.
@@ -549,7 +549,7 @@ The *AfterContent* sample explores the `AfterContentInit()` and `AfterContentChe
*Content projection* is a way to import HTML content from outside the component and insert that content
into the component's template in a designated spot.
<div class="l-sub-section">
<div class="alert is-helpful">
AngularJS developers know this technique as *transclusion*.
@@ -577,7 +577,7 @@ In this case, the projected content is the `<app-child>` from the parent.
<img src='generated/images/guide/lifecycle-hooks/projected-child-view.png' alt="Projected Content">
</figure>
<div class="l-sub-section">
<div class="alert is-helpful">
The telltale signs of *content projection* are twofold:
+1 -1
View File
@@ -71,7 +71,7 @@ as well as dynamically loaded in a pop-up dialog.
This error often means that you haven't declared the directive "x"
or haven't imported the NgModule to which "x" belongs.
<div class="l-sub-section">
<div class="alert is-helpful">
Perhaps you declared "x" in an application sub-module but forgot to export it.
The "x" class isn't visible to other modules until you add it to the `exports` list.
+1 -1
View File
@@ -7,7 +7,7 @@ You can download and install these npm packages with the [**npm client**](https:
The [**yarn client**](https://yarnpkg.com/en/) is a popular alternative for downloading and installing npm packages.
The Angular CLI uses `yarn` by default to install npm packages when you create a new project.
<div class="l-sub-section">
<div class="alert is-helpful">
Node.js and npm are essential to Angular development.
+2 -2
View File
@@ -34,7 +34,7 @@ An observer object can define any combination of these handlers. If you don't su
An `Observable` instance begins publishing values only when someone subscribes to it. You subscribe by calling the `subscribe()` method of the instance, passing an observer object to receive the notifications.
<div class="l-sub-section">
<div class="alert is-helpful">
In order to show how subscribing works, we need to create a new observable. There is a constructor that you use to create new instances, but for illustration, we can use some static methods on the `Observable` class that create simple observables of frequently used types:
@@ -96,7 +96,7 @@ Notice that if you subscribe twice, there will be two separate streams, each emi
<code-example path="observables/src/multicasting.ts" region="multicast_sequence" title="Create a multicast subscriber"></code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
Multicasting observables take a bit more setup, but they can be useful for certain applications. Later we will look at tools that simplify the process of multicasting, allowing you to take any observable and make it multicasting.
</div>
+4 -4
View File
@@ -54,7 +54,7 @@ Angular comes with a stock of pipes such as
They are all available for use in any template.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -123,7 +123,7 @@ As you click the button, the displayed date alternates between
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -186,7 +186,7 @@ Your pipe has one such parameter: the `exponent`.
Your pipe's name is `exponentialStrength`.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -390,7 +390,7 @@ For this reason, a pure pipe is preferable when you can live with the change det
When you can't, you *can* use the impure pipe.
<div class="l-sub-section">
<div class="alert is-helpful">
+3 -3
View File
@@ -28,7 +28,7 @@ You need to set up your development environment before you can do anything.
Install **[Node.js® and npm](https://nodejs.org/en/download/)**
if they are not already on your machine.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -73,7 +73,7 @@ The Angular CLI installs the necessary npm packages, creates the project files,
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -630,7 +630,7 @@ These files go in the root folder next to `src/`.
</tr>
</table>
<div class="l-sub-section">
<div class="alert is-helpful">
### Next Step
+2 -2
View File
@@ -8,7 +8,7 @@ This document contains the practices that we follow to provide you with a leadin
See [Updating your projects](guide/updating "Updating your projects") for information about how to update your apps and libraries to the latest version of Angular.
<div class="l-sub-section">
<div class="alert is-helpful">
The practices described in this document apply to Angular 2.0 and later. If you are currently using AngularJS, see [Upgrading from AngularJS](guide/upgrade "Upgrading from Angular JS"). _AngularJS_ is the name for all v1.x versions of Angular.
@@ -57,7 +57,7 @@ This cadence of releases gives you access to new beta features as soon as they a
{@a schedule}
## Release schedule
<div class="l-sub-section">
<div class="alert is-helpful">
Disclaimer: The dates are offered as general guidance and may be adjusted by us when necessary to ensure delivery of a high-quality platform.
+30 -30
View File
@@ -75,7 +75,7 @@ Import what you need from it as you would from any other Angular package.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -336,7 +336,7 @@ It has a great deal of useful information including:
</tr>
</table>
<div class="l-sub-section">
<div class="alert is-helpful">
Two older properties are still available. They are less capable than their replacements, discouraged, and may be deprecated in a future Angular version.
@@ -756,7 +756,7 @@ Modern HTML5 browsers were the first to support `pushState` which is why many pe
"HTML5 style" URLs.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -866,7 +866,7 @@ Once the application is bootstrapped, the `Router` performs the initial navigati
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -919,7 +919,7 @@ The `RouterOutlet` is a directive from the router library that marks
the spot in the template where the router should display the views for that outlet.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -949,7 +949,7 @@ or a URL fragment for jumping to different areas on the page. Query string param
are provided through the `[queryParams]` binding which takes an object (e.g. `{ name: 'value' }`), while the URL fragment
takes a single value bound to the `[fragment]` input binding.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1010,7 +1010,7 @@ The router will select _this_ route if it can't match a route earlier in the con
A wildcard route can navigate to a custom "404 Not Found" component or [redirect](#redirect) to an existing route.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1096,7 +1096,7 @@ In this app, the router should select the route to the `HeroListComponent` only
so set the `pathMatch` value to `'full'`.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1313,7 +1313,7 @@ then replacing `RouterModule.forRoot` in the `imports` array with the `AppRoutin
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1482,7 +1482,7 @@ using the same techniques you learned while creating the `AppRoutingModule`.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1509,7 +1509,7 @@ In the `AppRoutingModule`, you used the static **`RouterModule.forRoot`** method
In a feature module you use the static **`forChild`** method.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1622,7 +1622,7 @@ _before_ the hero routes.
The wildcard route&mdash;which matches _every_ URL&mdash;will intercept the attempt to navigate to a hero route.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1712,7 +1712,7 @@ The router composes the destination URL from the array like this:
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1864,7 +1864,7 @@ You need a way to detect when the route parameters change from _within the same
The observable `paramMap` property handles that beautifully.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -1907,7 +1907,7 @@ It's much simpler to write and read:
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2062,7 +2062,7 @@ They are **separated by semicolons ";"**
This is *matrix URL* notation&mdash;something you may not have seen before.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2090,7 +2090,7 @@ as this one can.
The list of heroes is unchanged. No hero row is highlighted.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2227,7 +2227,7 @@ The other two `@HostBinding` properties style the display and position of the co
The `HeroDetailComponent` will ease in from the left when routed to and will slide down when navigating away.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2597,7 +2597,7 @@ Navigation _within_ the feature area remains intact even if you change the paren
Here's an example:
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2623,7 +2623,7 @@ After the _link parameters array_, add an object with a `relativeTo` property se
The router then calculates the target URL based on the active route's location.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2781,7 +2781,7 @@ In this case there is only the "popup" outlet property and its value is another
You are in effect saying, _when the user clicks this link, display the component associated with the `compose` route in the `popup` outlet_.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -2898,7 +2898,7 @@ A guard's return value controls the router's behavior:
* If it returns `false`, the navigation process stops and the user stays put.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -3030,7 +3030,7 @@ feature module, a dashboard route and two unfinished components to manage crises
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -3207,7 +3207,7 @@ Import and add the `LoginRoutingModule` to the `AppModule` imports as well.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -3318,7 +3318,7 @@ This demo does neither. Instead, it asks the user to make that choice explicitly
in a confirmation dialog box that *waits asynchronously for the user's
answer*.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -3596,7 +3596,7 @@ and fragment to the next route.
</code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
The `queryParamsHandling` feature also provides a `merge` option, which will preserve and combine the current query parameters with any provided query parameters
@@ -3630,7 +3630,7 @@ You can use these persistent bits of information for things that need to be prov
authentication tokens or session ids.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -3700,7 +3700,7 @@ The lazy loading and re-configuration happen just once, when the route is _first
the module and routes are available immediately for subsequent requests.
<div class="l-sub-section">
<div class="alert is-helpful">
@@ -3983,7 +3983,7 @@ Let's take the `Hero` routes and migrate them to new URLs. The `Router` checks f
You'll notice two different types of redirects. The first change is from `/heroes` to `/superheroes` without any parameters. This is a straightforward redirect, unlike the change from `/hero/:id` to `/superhero/:id`, which includes the `:id` route parameter. Router redirects also use powerful pattern matching, so the `Router` inspects the URL and replaces route parameters in the `path` with their appropriate destination. Previously, you navigated to a URL such as `/hero/15` with a route parameter `id` of `15`.
<div class="l-sub-section">
<div class="alert is-helpful">
The `Router` also supports [query parameters](#query-parameters) and the [fragment](#fragment) when using redirects.
@@ -4195,7 +4195,7 @@ making it the default strategy.
You can switch to the `HashLocationStrategy` with an override during the bootstrapping process if you prefer it.
<div class="l-sub-section">
<div class="alert is-helpful">
+2 -2
View File
@@ -47,7 +47,7 @@ The `pipe()` function is also a method on the RxJS `Observable`, so you use this
RxJS provides many operators, but only a handful are used frequently. For a list of operators and usage samples, visit the [RxJS API Documentation](https://rxjs-dev.firebaseapp.com/api).
<div class="l-sub-section">
<div class="alert is-helpful">
Note that, for Angular apps, we prefer combining operators with pipes, rather than chaining. Chaining is used in many RxJS examples.
</div>
@@ -80,7 +80,7 @@ The following converts the previous example to retry the request before catching
<code-example path="rx-library/src/retry-on-error.ts" title="retry operator"></code-example>
<div class="l-sub-section">
<div class="alert is-helpful">
Do not retry **authentication** requests, since these should only be initiated by user action. We don't want to lock out user accounts with repeated login requests that the user has not initiated.

Some files were not shown because too many files have changed in this diff Show More