chore(templates): import required directives for ionic templates

This commit is contained in:
Adam Bradley
2016-07-01 00:59:37 -05:00
parent 009d5a980a
commit 656426672c
27 changed files with 266 additions and 217 deletions

View File

@ -1,4 +1,5 @@
import { AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, forwardRef, Input, HostListener, OnDestroy, Optional, Output, Provider, Renderer, QueryList, ViewEncapsulation } from '@angular/core';
import { NgIf } from '@angular/common';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { ActionSheet } from '../action-sheet/action-sheet';
@ -10,7 +11,7 @@ import { Item } from '../item/item';
import { NavController } from '../nav/nav-controller';
import { Option } from '../option/option';
const SELECT_VALUE_ACCESSOR = new Provider(
export const SELECT_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => Select), multi: true});
@ -116,19 +117,21 @@ const SELECT_VALUE_ACCESSOR = new Provider(
*/
@Component({
selector: 'ion-select',
template:
'<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>' +
'<button aria-haspopup="true" ' +
'[id]="id" ' +
'category="item-cover" ' +
'[attr.aria-labelledby]="_labelId" ' +
'[attr.aria-disabled]="_disabled" ' +
'class="item-cover">' +
'</button>',
template: `
<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>
<button aria-haspopup="true"
[id]="id"
category="item-cover"
[attr.aria-labelledby]="_labelId"
[attr.aria-disabled]="_disabled"
class="item-cover">
</button>
`,
directives: [NgIf],
host: {
'[class.select-disabled]': '_disabled'
},