mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
refactor(cssClass): update/cleanup css class usage
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import {Component, View, Directive, Optional, NgControl} from 'angular2/angular2';
|
||||
import {Component, View, Directive, Optional, NgControl, ElementRef, Renderer} from 'angular2/angular2';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {IonicForm} from '../form/form';
|
||||
@ -24,7 +24,6 @@ import {IonicForm} from '../form/form';
|
||||
'id'
|
||||
],
|
||||
host: {
|
||||
'class': 'item',
|
||||
'role': 'checkbox',
|
||||
'tappable': 'true',
|
||||
'[attr.tab-index]': 'tabIndex',
|
||||
@ -47,8 +46,11 @@ export class Checkbox {
|
||||
|
||||
constructor(
|
||||
form: IonicForm,
|
||||
@Optional() ngControl: NgControl
|
||||
@Optional() ngControl: NgControl,
|
||||
elementRef: ElementRef,
|
||||
renderer: Renderer
|
||||
) {
|
||||
renderer.setElementClass(elementRef, 'item', true);
|
||||
this.form = form;
|
||||
form.register(this);
|
||||
|
||||
|
Reference in New Issue
Block a user