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()" (docInserted)="onDocInserted()"
(docRendered)="onDocRendered()"> (docRendered)="onDocRendered()">
</aio-doc-viewer> </aio-doc-viewer>
<aio-dt [on]="dtOn" [(doc)]="currentDocument"></aio-dt> <aio-dt *ngIf="dtOn" [(doc)]="currentDocument"></aio-dt>
</main> </main>
</mat-sidenav-container> </mat-sidenav-container>

View File

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