chore(): remove use of host: {inputs: []}

This commit is contained in:
Adam Bradley
2016-01-14 21:14:23 -06:00
parent 02626b9489
commit b5d8a1de70
2 changed files with 33 additions and 38 deletions

View File

@ -37,23 +37,23 @@ import {IonicApp} from './app';
* has been navigated away from.
*/
@Directive({
selector: '[id]',
inputs: ['id']
selector: '[id]'
})
export class IdRef {
component: any;
id: string;
private _component: any;
constructor(private _app: IonicApp, private _elementRef: ElementRef, private _appViewManager: AppViewManager) {
@Input() id: string;
constructor(private _app: IonicApp, elementRef: ElementRef, appViewManager: AppViewManager) {
// Grab the component this directive is attached to
this.component = _appViewManager.getComponent(_elementRef);
this._component = appViewManager.getComponent(elementRef);
}
/**
* @private
*/
ngOnInit() {
this._app.register(this.id, this.component);
this._app.register(this.id, this._component);
}
/**

View File

@ -364,8 +364,7 @@ export class Slides extends Ion {
.easing('linear');
let za = new Animation();
za.fill('none');
za.add(zi);//, zw);
za.add(zi);
if (this.scale > 1) {
// Zoom out
@ -502,7 +501,7 @@ export class Slides extends Ion {
if (Math.abs(this.touch.x) > this.viewportWidth) {
// TODO what is posX?
posX = posX > 0 ? this.viewportWidth - 1 : -(this.viewportWidth - 1);
var posX = posX > 0 ? this.viewportWidth - 1 : -(this.viewportWidth - 1);
console.log('Setting on posx', this.touch.x);
}
@ -594,16 +593,13 @@ export class Slides extends Ion {
*/
@Component({
selector: 'ion-slide',
inputs: ['zoom'],
template: '<div class="slide-zoom"><ng-content></ng-content></div>'
})
export class Slide {
private ele: HTMLElement;
/**
* TODO
* @param {Slides} slides The containing slidebox.
* @param {ElementRef} elementRef TODO
*/
@Input() zoom;
constructor(
elementRef: ElementRef,
@Host() slides: Slides
@ -620,9 +616,8 @@ export class Slide {
*/
@Directive({
selector: 'slide-lazy',
host: {
'class': 'swiper-lazy'
}
})
export class SlideLazy {
constructor(elementRef: ElementRef) {
elementRef.nativeElement.classList.add('swiper-lazy');
}
}
export class SlideLazy {}