mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(templates): import required directives for ionic templates
This commit is contained in:
@ -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'
|
||||
},
|
||||
|
Reference in New Issue
Block a user