refactor(docs-infra): fix docs examples for Angular-specific tslint rules (#38143)

This commit updates the docs examples to be compatible with the
following Angular-specific tslint rules:
- `component-selector`
- `directive-selector`
- `no-conflicting-lifecycle`
- `no-host-metadata-property`
- `no-input-rename`
- `no-output-native`
- `no-output-rename`

This is in preparation of updating the docs examples `tslint.json` to
match the one generated for new Angular CLI apps in a future commit.

PR Close #38143
This commit is contained in:
George Kalpakas
2020-07-30 13:03:21 +03:00
committed by Michael Prentice
parent 97ae2d3b9b
commit f677c22fba
27 changed files with 40 additions and 36 deletions

View File

@ -42,7 +42,7 @@ mark valid insertion points in the template.
`AdDirective` injects `ViewContainerRef` to gain access to the view
container of the element that will host the dynamically added component.
In the `@Directive` decorator, notice the selector name, `ad-host`;
In the `@Directive` decorator, notice the selector name, `adHost`;
that's what you use to apply the directive to the element.
The next section shows you how.
@ -56,7 +56,7 @@ decorator's `template` property as a template string.
The `<ng-template>` element is where you apply the directive you just made.
To apply the `AdDirective`, recall the selector from `ad.directive.ts`,
`ad-host`. Apply that to `<ng-template>` without the square brackets. Now Angular knows
`[adHost]`. Apply that to `<ng-template>` without the square brackets. Now Angular knows
where to dynamically load components.

View File

@ -14,7 +14,7 @@ When you call `emit()`, it passes the emitted value to the `next()` method of an
A good example of usage can be found in the [EventEmitter](api/core/EventEmitter) documentation. Here is the example component that listens for open and close events:
`<zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>`
`<app-zippy (open)="onOpen($event)" (close)="onClose($event)"></app-zippy>`
Here is the component definition: