refactor(cssClass): use host class instead of renderer

Since angular2 alpha46 we can now use host: {‘class’:’item’} without it
getting removed by user css classes.
This commit is contained in:
Adam Bradley
2015-11-14 15:13:35 -06:00
parent 4bbee6e89f
commit 9ef27f8c56
8 changed files with 38 additions and 51 deletions

View File

@ -1,4 +1,4 @@
import {Directive, ElementRef, Renderer, NgZone} from 'angular2/angular2';
import {Directive, ElementRef, NgZone} from 'angular2/angular2';
import {Ion} from '../ion';
import {Config} from '../../config/config';
@ -23,22 +23,18 @@ import * as util from 'ionic/util';
'items',
'virtual',
'content'
]
],
host: {
'class': 'list'
}
})
export class List extends Ion {
/**
* TODO
* @param {ElementRef} elementRef TODO
* @param {Config} config TODO
*/
constructor(elementRef: ElementRef, config: Config, renderer: Renderer, private zone: NgZone) {
constructor(elementRef: ElementRef, config: Config, private zone: NgZone) {
super(elementRef, config);
renderer.setElementClass(elementRef, 'list', true);
this.ele = elementRef.nativeElement;
}
/**
* TODO
*/
onInit() {
super.onInit();