mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
Merge remote-tracking branch 'origin/master' into WIP-api-demos
This commit is contained in:
@ -1,8 +1,11 @@
|
||||
import {Directive, Optional, ElementRef, Renderer} from 'angular2/angular2';
|
||||
import {Directive, Optional, ElementRef, Renderer} from 'angular2/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {TextInput} from './text-input';
|
||||
import {pointerCoord, hasPointerMoved} from '../../util/dom';
|
||||
import {Form} from '../../util/form';
|
||||
|
||||
|
||||
/**
|
||||
* @name Label
|
||||
* @description
|
||||
@ -39,15 +42,19 @@ export class Label {
|
||||
constructor(
|
||||
config: Config,
|
||||
@Optional() container: TextInput,
|
||||
private form: Form,
|
||||
private elementRef: ElementRef,
|
||||
private renderer: Renderer
|
||||
) {
|
||||
this.scrollAssist = config.get('scrollAssist');
|
||||
if (!this.id) {
|
||||
this.id = 'lbl-' + (++labelIds);
|
||||
}
|
||||
this.container = container;
|
||||
container && container.registerLabel(this);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if (!this.id) {
|
||||
this.id = 'lbl-' + this.form.nextId();
|
||||
}
|
||||
this.container && this.container.registerLabel(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,5 +95,3 @@ export class Label {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
let labelIds = -1;
|
||||
|
Reference in New Issue
Block a user