Skip to content

Commit

Permalink
feat(module:select): fix the test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-yangy committed Mar 28, 2019
1 parent 559dd55 commit f90d912
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions components/select/demo/custom-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-select-custom-template',
template: `
<nz-select style="width: 200px;" nzAllowClear nzPlaceHolder="Select OS" [(ngModel)]="selectedOS" [nzCustomTemplate]="custom">
<nz-select
style="width: 200px;"
nzAllowClear
nzPlaceHolder="Select OS"
[(ngModel)]="selectedOS"
[nzCustomTemplate]="custom"
>
<nz-option nzCustomContent nzLabel="Windows" nzValue="windows"><i nz-icon type="windows"></i> Windows</nz-option>
<nz-option nzCustomContent nzLabel="Mac" nzValue="mac"><i nz-icon type="apple"></i> Mac</nz-option>
<nz-option nzCustomContent nzLabel="Android" nzValue="android"><i nz-icon type="android"></i> Android</nz-option>
</nz-select>
<ng-template #custom let-selected>
<div>
Label: {{selected.nzLabel}}
</div>
<div>
Value: {{ selected.nzValue }}
</div>
<div>Label: {{ selected.nzLabel }}</div>
<div>Value: {{ selected.nzValue }}</div>
</ng-template>
`
})
export class NzDemoSelectCustomTemplateComponent {
selectedOS;
selectedOS = null;
}

0 comments on commit f90d912

Please sign in to comment.