Skip to content

Commit d523630

Browse files
sjtrimblevicb
authored andcommitted
docs(aio): cleanup aalert, callout, subsection use and author style (angular#24986)
PR Close angular#24986
1 parent d6016f1 commit d523630

Some content is hidden

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

55 files changed

+345
-306
lines changed

aio/content/guide/animations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ code uses [AnimationBuilder](/api/animations/AnimationBuilder). If your code doe
2222
uncomment the `web-animations-js` polyfill from the `polyfills.ts` file generated by Angular CLI.
2323
</div>
2424

25-
<div class="l-sub-section">
25+
<div class="alert is-helpful">
2626

2727
The examples in this page are available as a <live-example></live-example>.
2828

@@ -183,7 +183,7 @@ transition definitions, and not in a separate `state(void)` definition. Thus, th
183183
are different on enter and leave: the element enters from the left
184184
and leaves to the right.
185185

186-
<div class="l-sub-section">
186+
<div class="alert is-helpful">
187187

188188
These two common animations have their own aliases:
189189

aio/content/guide/aot-compiler.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScri
44

55
This guide explains how to build with the AOT compiler using different compiler options and how to write Angular metadata that AOT can compile.
66

7-
<div class="l-sub-section">
7+
<div class="alert is-helpful>
88

99
<a href="https://www.youtube.com/watch?v=kW9cJsvcsGo">Watch compiler author Tobias Bosch explain the Angular Compiler</a> at AngularConnect 2016.
1010

@@ -39,7 +39,7 @@ For AOT compilation, append the `--aot` flags to the _build-only_ or the _build-
3939
ng serve --aot
4040
</code-example>
4141

42-
<div class="l-sub-section">
42+
<div class="alert is-helpful">
4343

4444
The `--prod` meta-flag compiles with AOT by default.
4545

@@ -297,7 +297,7 @@ At the same time, the AOT **_collector_** analyzes the metadata recorded in the
297297
298298
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).
299299
300-
<div class="l-sub-section">
300+
<div class="alert is-helpful">
301301
302302
Angular's [schema.ts](https://github.com/angular/angular/blob/master/packages/compiler-cli/src/metadata/schema.ts)
303303
describes the JSON format as a collection of TypeScript interfaces.
@@ -333,7 +333,7 @@ Parentheses | `(a + b)`
333333
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
334334
piece of metadata to generate the application code.
335335
336-
<div class="l-sub-section">
336+
<div class="alert is-helpful">
337337
338338
If you want `ngc` to report syntax errors immediately rather than produce a `.metadata.json` file with errors, set the `strictMetadataEmit` option in `tsconfig`.
339339

aio/content/guide/architecture-modules.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Here's a simple root NgModule definition:
2626

2727
<code-example path="architecture/src/app/mini-app.ts" region="module" title="src/app/app.module.ts" linenums="false"></code-example>
2828

29-
<div class="l-sub-section">
29+
<div class="alert is-helpful">
3030

3131
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.
3232

@@ -56,7 +56,7 @@ A component and its template together define a _view_. A component can contain a
5656

5757
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.
5858

59-
<div class="l-sub-section">
59+
<div class="alert is-helpful">
6060
The hierarchical structure of views is a key factor in the way Angular detects and responds to changes in the DOM and app data.
6161
</div>
6262

@@ -72,7 +72,7 @@ Other JavaScript modules use *import statements* to access public objects from o
7272

7373
<code-example path="architecture/src/app/app.module.ts" region="export" linenums="false"></code-example>
7474

75-
<div class="l-sub-section">
75+
<div class="alert is-helpful">
7676
<a href="http://exploringjs.com/es6/ch_modules.html">Learn more about the JavaScript module system on the web.</a>
7777
</div>
7878

@@ -99,7 +99,7 @@ In the example of the simple root module above, the application module needs mat
9999

100100
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.
101101

102-
<div class="l-sub-section">
102+
<div class="alert is-helpful">
103103

104104
Learn more from the [NgModules](guide/ngmodules) page.
105105

aio/content/guide/architecture.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Like JavaScript modules, NgModules can import functionality from other NgModules
2727

2828
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.
2929

30-
<div class="l-sub-section">
30+
<div class="alert is-helpful">
3131

3232
For a more detailed discussion, see [Introduction to modules](guide/architecture-modules).
3333

@@ -39,7 +39,7 @@ Every Angular application has at least one component, the *root component* that
3939

4040
The `@Component` decorator identifies the class immediately below it as a component, and provides the template and related component-specific metadata.
4141

42-
<div class="l-sub-section">
42+
<div class="alert is-helpful">
4343

4444
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.
4545

@@ -59,7 +59,7 @@ Before a view is displayed, Angular evaluates the directives and resolves the bi
5959

6060
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.
6161

62-
<div class="l-sub-section">
62+
<div class="alert is-helpful">
6363

6464
For a more detailed discussion of these concepts, see [Introduction to components](guide/architecture-components).
6565

@@ -74,7 +74,7 @@ For data or logic that is not associated with a specific view, and that you want
7474

7575
*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.
7676

77-
<div class="l-sub-section">
77+
<div class="alert is-helpful">
7878

7979
For a more detailed discusssion, see [Introduction to services and DI](guide/architecture-services).
8080

@@ -96,7 +96,7 @@ The router interprets a link URL according to your app's view navigation rules a
9696

9797
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.
9898

99-
<div class="l-sub-section">
99+
<div class="alert is-helpful">
100100

101101
For a more detailed discussion, see [Routing and navigation](guide/router).
102102

@@ -128,7 +128,7 @@ Each of these subjects is introduced in more detail in the following pages.
128128
* [Pipes](guide/architecture-components#pipes)
129129
* [Services and dependency injection](guide/architecture-services)
130130

131-
<div class="l-sub-section">
131+
<div class="alert is-helpful">
132132

133133
Note that the code referenced on these pages is available as a <live-example></live-example>.
134134
</div>

aio/content/guide/attribute-directives.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ng generate directive highlight
5151

5252
The CLI creates `src/app/highlight.directive.ts`, a corresponding test file (`.../spec.ts`, and _declares_ the directive class in the root `AppModule`.
5353

54-
<div class="l-sub-section">
54+
<div class="alert is-helpful">
5555

5656
_Directives_ must be declared in [Angular Modules](guide/ngmodules) in the same manner as _components_.
5757

@@ -71,7 +71,7 @@ Angular locates each element in the template that has an attribute named `appHig
7171

7272
The _attribute selector_ pattern explains the name of this kind of directive.
7373

74-
<div class="l-sub-section">
74+
<div class="alert is-helpful">
7575

7676
#### Why not "highlight"?
7777

@@ -146,7 +146,7 @@ each adorned by the `HostListener` decorator.
146146
The `@HostListener` decorator lets you subscribe to events of the DOM
147147
element that hosts an attribute directive, the `<p>` in this case.
148148

149-
<div class="l-sub-section">
149+
<div class="alert is-helpful">
150150

151151
Of course you could reach into the DOM with standard JavaScript and attach event listeners manually.
152152
There are at least three problems with _that_ approach:

aio/content/guide/browser-support.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Angular supports most recent browsers. This includes the following specific vers
9595

9696
</table>
9797

98-
<div class="l-sub-section">
98+
<div class="alert is-helpful">
9999

100100
Angular's continuous integration process runs unit tests of the framework on all of these browsers for every pull request,
101101
using <a href="https://saucelabs.com/">SauceLabs</a> and
@@ -154,7 +154,7 @@ add it yourself, following the same pattern:
154154
1. install the npm package
155155
1. `import` the file in `polyfills.ts`
156156

157-
<div class="l-sub-section">
157+
<div class="alert is-helpful">
158158

159159
Non-CLI users should follow the instructions [below](#non-cli).
160160
</div>

aio/content/guide/component-interaction.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ E2E tests of input property setter with empty and non-empty names:
119119

120120
Detect and act upon changes to input property values with the `ngOnChanges()` method of the `OnChanges` lifecycle hook interface.
121121

122-
<div class="l-sub-section">
122+
<div class="alert is-helpful">
123123

124124

125125

@@ -311,7 +311,7 @@ The following example illustrates this technique with the same
311311
Neither its appearance nor its behavior will change.
312312
The child [CountdownTimerComponent](guide/component-interaction#countdown-timer-example) is the same as well.
313313

314-
<div class="l-sub-section">
314+
<div class="alert is-helpful">
315315

316316

317317

@@ -400,7 +400,7 @@ Each `AstronautComponent` is a child of the `MissionControlComponent` and theref
400400

401401

402402

403-
<div class="l-sub-section">
403+
<div class="alert is-helpful">
404404

405405

406406

aio/content/guide/component-styles.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ They are _not inherited_ by any components nested within the template nor by any
187187

188188
</div>
189189

190-
<div class="l-sub-section">
190+
<div class="alert is-helpful">
191191

192192
You can specify more than one styles file or even a combination of `styles` and `styleUrls`.
193193

aio/content/guide/dependency-injection-in-action.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ application and don't need to be listed in any module.
2525
Service classes can act as their own providers which is why defining them in the `@Injectable` decorator
2626
is all the registration you need.
2727

28-
<div class="l-sub-section">
28+
<div class="alert is-helpful">
2929

3030

3131

@@ -167,7 +167,7 @@ that is visible only to the component and its children, if any.
167167
You could also provide the `HeroService` to a *different* component elsewhere in the application.
168168
That would result in a *different* instance of the service, living in a *different* injector.
169169

170-
<div class="l-sub-section">
170+
<div class="alert is-helpful">
171171

172172

173173

@@ -433,7 +433,7 @@ It may already have that value in its internal container.
433433
If it doesn't, it may be able to make one with the help of a ***provider***.
434434
A *provider* is a recipe for delivering a service associated with a *token*.
435435

436-
<div class="l-sub-section">
436+
<div class="alert is-helpful">
437437

438438

439439

@@ -577,7 +577,7 @@ The second provider substitutes the `DateLoggerService` for the `LoggerService`.
577577
The `LoggerService` is already registered at the `AppComponent` level.
578578
When _this component_ requests the `LoggerService`, it receives the `DateLoggerService` instead.
579579

580-
<div class="l-sub-section">
580+
<div class="alert is-helpful">
581581

582582

583583

@@ -645,7 +645,7 @@ The `HeroOfTheMonthComponent` constructor's `logger` parameter is typed as `Mini
645645
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).
646646

647647

648-
<div class="l-sub-section">
648+
<div class="alert is-helpful">
649649

650650

651651

@@ -707,7 +707,7 @@ After some undisclosed work, the function returns the string of names
707707
and Angular injects it into the `runnersUp` parameter of the `HeroOfTheMonthComponent`.
708708

709709

710-
<div class="l-sub-section">
710+
<div class="alert is-helpful">
711711

712712

713713

@@ -769,7 +769,7 @@ A ***class-interface*** should define *only* the members that its consumers are
769769
Such a narrowing interface helps decouple the concrete class from its consumers.
770770

771771

772-
<div class="l-sub-section">
772+
<div class="alert is-helpful">
773773

774774

775775

@@ -866,7 +866,7 @@ and displays them in the order they arrive from the database.
866866

867867

868868

869-
<div class="l-sub-section">
869+
<div class="alert is-helpful">
870870

871871

872872

@@ -982,7 +982,7 @@ If you're lucky, they all implement the same base class
982982
whose API your `NewsComponent` understands.
983983

984984

985-
<div class="l-sub-section">
985+
<div class="alert is-helpful">
986986

987987

988988

@@ -1165,7 +1165,7 @@ its class signature doesn't mention `Parent`:
11651165

11661166

11671167

1168-
<div class="l-sub-section">
1168+
<div class="alert is-helpful">
11691169

11701170

11711171

aio/content/guide/dependency-injection-pattern.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ now in the constructor.
8181
The `Car` class no longer creates an `engine` or `tires`.
8282
It just consumes them.
8383

84-
<div class="l-sub-section">
84+
<div class="alert is-helpful">
8585

8686
This example leverages TypeScript's constructor syntax for declaring
8787
parameters and properties simultaneously.
@@ -101,7 +101,7 @@ conform to the general API requirements of an `engine` or `tires`.
101101

102102
Now, if someone extends the `Engine` class, that is not `Car`'s problem.
103103

104-
<div class="l-sub-section">
104+
<div class="alert is-helpful">
105105

106106
The _consumer_ of `Car` has the problem. The consumer must update the car creation code to
107107
something like this:

0 commit comments

Comments
 (0)