parent
2f6c97e93c
commit
27745c5d8c
|
@ -659,7 +659,7 @@ There is no convenient way to describe this constraint to TypeScript and the tem
|
|||
|
||||
The non-null assertion operator should be used sparingly as refactoring of the component might break this constraint.
|
||||
|
||||
In this example it is recommended to include the checking of `address` in the `*ngIf`as shown below:
|
||||
In this example it is recommended to include the checking of `address` in the `*ngIf` as shown below:
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
|
|
|
@ -574,7 +574,7 @@ as the token for a provider of `LoggerService`.
|
|||
|
||||
An abstract class is usually a base class that you can extend.
|
||||
In this app, however there is no class that inherits from `MinimalLogger`.
|
||||
The `LoggerService` and the `DateLoggerService`could have inherited from `MinimalLogger`,
|
||||
The `LoggerService` and the `DateLoggerService` could have inherited from `MinimalLogger`,
|
||||
or they could have implemented it instead, in the manner of an interface.
|
||||
But they did neither.
|
||||
`MinimalLogger` is used only as a dependency injection token.
|
||||
|
|
|
@ -564,7 +564,7 @@ The next step is to add a binding to the `ChildComponent` template.
|
|||
</code-example>
|
||||
|
||||
To render the new values, add `<app-child>` to the bottom of
|
||||
the`AppComponent` template so the view also displays the sunflower:
|
||||
the `AppComponent` template so the view also displays the sunflower:
|
||||
|
||||
```
|
||||
Child Component
|
||||
|
|
|
@ -30,7 +30,7 @@ The context also defines a *merge strategy* that determines how changes are merg
|
|||
### Defining rules and actions
|
||||
|
||||
When you create a new blank schematic with the [Schematics CLI](#cli), the generated entry function is a *rule factory*.
|
||||
A `RuleFactory`object defines a higher-order function that creates a `Rule`.
|
||||
A `RuleFactory` object defines a higher-order function that creates a `Rule`.
|
||||
|
||||
<code-example language="TypeScript" header="index.ts">
|
||||
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
||||
|
|
|
@ -2972,7 +2972,7 @@ appropriate to the method, that is, the parameter of an `@NgModule`,
|
|||
{@a testbed-methods}
|
||||
{@a testbed-api-summary}
|
||||
|
||||
The `TestBed` API consists of static class methods that either update or reference a _global_ instance of the`TestBed`.
|
||||
The `TestBed` API consists of static class methods that either update or reference a _global_ instance of the `TestBed`.
|
||||
|
||||
Internally, all static methods cover methods of the current runtime `TestBed` instance,
|
||||
which is also returned by the `getTestBed()` function.
|
||||
|
|
|
@ -315,7 +315,7 @@ Angular app. The setup for a hybrid app is mostly the same as described in the
|
|||
`main-aot.ts`.
|
||||
|
||||
AOT needs to load any AngularJS files that are in the `<script>` tags in the AngularJS `index.html`.
|
||||
An easy way to copy them is to add each to the `copy-dist-files.js`file.
|
||||
An easy way to copy them is to add each to the `copy-dist-files.js` file.
|
||||
|
||||
You also need to pass the generated `MainAngularModuleFactory` to `downgradeModule()` instead of the
|
||||
custom bootstrap function:
|
||||
|
|
|
@ -272,7 +272,7 @@ That header is in the `httpOptions` constant defined in the `HeroService`. Add t
|
|||
</code-example>
|
||||
|
||||
Refresh the browser, change a hero name and save your change. The `save()`
|
||||
method in `HeroDetailComponent`navigates to the previous view.
|
||||
method in `HeroDetailComponent` navigates to the previous view.
|
||||
The hero now appears in the list with the changed name.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue