refactor(docs-infra): get rid of `on` component input (#26947)

Compiling with Ivy doesn't seem to allow input names starting with `on`.

PR Close #26947
This commit is contained in:
George Kalpakas 2018-11-05 20:50:01 +02:00 committed by Jason Aden
parent 9d3dae42e9
commit 9d81bd39ca
2 changed files with 7 additions and 8 deletions

View File

@ -61,7 +61,7 @@
(docInserted)="onDocInserted()"
(docRendered)="onDocRendered()">
</aio-doc-viewer>
<aio-dt [on]="dtOn" [(doc)]="currentDocument"></aio-dt>
<aio-dt *ngIf="dtOn" [(doc)]="currentDocument"></aio-dt>
</main>
</mat-sidenav-container>

View File

@ -4,17 +4,16 @@ import { DocumentContents } from 'app/documents/document.service';
@Component({
selector: 'aio-dt',
template: `
<div *ngIf="on">
<hr>
<textarea #dt [value]="text" rows="10" cols="80"></textarea>
<br/>
<button (click)="dtextSet()">Show change</button>
</div>
<div>
<hr>
<textarea #dt [value]="text" rows="10" cols="80"></textarea>
<br/>
<button (click)="dtextSet()">Show change</button>
</div>
`
})
export class DtComponent {
@Input() on = false;
@Input() doc: DocumentContents;
@Output() docChange = new EventEmitter<DocumentContents>();