refactor(docs-infra): fix docs examples for tslint rule no-angle-bracket-type-assertion
(#38143)
This commit updates the docs examples to be compatible with the `no-angle-bracket-type-assertion` tslint rule. 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:

committed by
Alex Rickabaugh

parent
ff72da60d3
commit
18a5117d1e
@ -12,7 +12,7 @@ export class AppComponent {
|
||||
clickMessage = '';
|
||||
|
||||
onSave(event?: KeyboardEvent) {
|
||||
const evtMsg = event ? ' Event target is ' + (<HTMLElement>event.target).textContent : '';
|
||||
const evtMsg = event ? ' Event target is ' + (event.target as HTMLElement).textContent : '';
|
||||
alert('Saved.' + evtMsg);
|
||||
if (event) { event.stopPropagation(); }
|
||||
}
|
||||
@ -22,7 +22,7 @@ export class AppComponent {
|
||||
}
|
||||
|
||||
onClickMe(event?: KeyboardEvent) {
|
||||
const evtMsg = event ? ' Event target class is ' + (<HTMLElement>event.target).className : '';
|
||||
const evtMsg = event ? ' Event target class is ' + (event.target as HTMLElement).className : '';
|
||||
alert('Click me.' + evtMsg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user