Update select.ts

Added ability set selected text like md-selected-text
This commit is contained in:
xr0master
2016-07-16 14:52:47 +03:00
committed by GitHub
parent 99efa3687f
commit cc343d8ed2

View File

@ -119,7 +119,7 @@ export const SELECT_VALUE_ACCESSOR = new Provider(
selector: 'ion-select',
template: `
<div *ngIf="!_text" class="select-placeholder select-text">{{placeholder}}</div>
<div *ngIf="_text" class="select-text">{{_text}}</div>
<div *ngIf="_text" class="select-text">{{selectedText || _text}}</div>
<div class="select-icon">
<div class="select-icon-inner"></div>
</div>
@ -184,6 +184,11 @@ export class Select implements AfterContentInit, ControlValueAccessor, OnDestroy
* @input {string} The interface the select should use: `action-sheet` or `alert`. Default: `alert`.
*/
@Input() interface: string = '';
/**
* @input {string} The selected text should be showen.
*/
@Input() selectedText: string = '';
/**
* @output {any} Any expression you want to evaluate when the selection has changed.