add ion-input display type to inner label/input

This commit is contained in:
Adam Bradley
2015-12-08 14:59:50 -06:00
parent 21c8f35573
commit ad57fc02f8
2 changed files with 26 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import {Directive, Optional} from 'angular2/angular2';
import {Directive, Optional, ElementRef, Renderer} from 'angular2/angular2';
import {Config} from '../../config/config';
import {TextInput} from './text-input';
@ -35,7 +35,12 @@ import {pointerCoord, hasPointerMoved} from '../../util/dom';
})
export class Label {
constructor(config: Config, @Optional() container: TextInput) {
constructor(
config: Config,
@Optional() container: TextInput,
private elementRef: ElementRef,
private renderer: Renderer
) {
this.scrollAssist = config.get('scrollAssist');
if (!this.id) {
this.id = 'lbl-' + (++labelIds);
@ -74,6 +79,10 @@ export class Label {
}
}
addClass(className) {
this.renderer.setElementClass(this.elementRef, className, true);
}
}
let labelIds = -1;