feat(select): add placeholder as an input for select

closes #6862
This commit is contained in:
Brandy Carney
2016-06-14 20:24:35 -04:00
parent ea450d41d3
commit 461ba11de9
5 changed files with 24 additions and 2 deletions

View File

@ -116,7 +116,8 @@ const SELECT_VALUE_ACCESSOR = new Provider(
@Component({
selector: 'ion-select',
template:
'<div class="select-text">{{_text}}</div>' +
'<div *ngIf="!_text" class="select-placeholder select-text">{{placeholder}}</div>' +
'<div *ngIf="_text" class="select-text">{{_text}}</div>' +
'<div class="select-icon">' +
'<div class="select-icon-inner"></div>' +
'</div>' +
@ -159,6 +160,11 @@ export class Select {
*/
@Input() okText: string = 'OK';
/**
* @input {string} The text to display when the select is empty.
*/
@Input() placeholder: string;
/**
* @input {any} Any addition options that the alert interface can take.
* See the [Alert API docs](../../alert/Alert) for the create options.