mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
22 lines
463 B
TypeScript
22 lines
463 B
TypeScript
import {Directive, Parent, Optional} from 'angular2/angular2';
|
|
|
|
import {Input} from './text-input';
|
|
import {IonicConfig} from '../../config/config';
|
|
|
|
|
|
@Directive({
|
|
selector: 'label',
|
|
host: {
|
|
'[attr.id]': 'id',
|
|
'[class.input-label]': 'inputLabel'
|
|
}
|
|
})
|
|
export class Label {
|
|
constructor(@Optional() @Parent() container: Input, config: IonicConfig) {
|
|
if (container) {
|
|
container.registerLabel(this);
|
|
this.inputLabel = true;
|
|
}
|
|
}
|
|
}
|