mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(cssClass): update/cleanup css class usage
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
View,
|
||||
Directive,
|
||||
ElementRef,
|
||||
Renderer,
|
||||
Host,
|
||||
Optional,
|
||||
NgControl,
|
||||
@@ -84,7 +85,6 @@ class MediaSwitch {
|
||||
'id'
|
||||
],
|
||||
host: {
|
||||
'class': 'item',
|
||||
'role': 'checkbox',
|
||||
'tappable': 'true',
|
||||
'[attr.tab-index]': 'tabIndex',
|
||||
@@ -119,11 +119,14 @@ export class Switch {
|
||||
form: IonicForm,
|
||||
elementRef: ElementRef,
|
||||
config: IonicConfig,
|
||||
renderer: Renderer,
|
||||
@Optional() private ngControl: NgControl
|
||||
) {
|
||||
this.form = form;
|
||||
form.register(this);
|
||||
|
||||
renderer.setElementClass(elementRef, 'item', true);
|
||||
|
||||
this.lastTouch = 0;
|
||||
this.mode = config.get('mode');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user