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. * has been navigated away from.
*/ */
@Directive({ @Directive({
selector: '[id]', selector: '[id]'
inputs: ['id']
}) })
export class IdRef { export class IdRef {
component: any; private _component: any;
id: string;
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 // Grab the component this directive is attached to
this.component = _appViewManager.getComponent(_elementRef); this._component = appViewManager.getComponent(elementRef);
} }
/** /**
* @private * @private
*/ */
ngOnInit() { 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'); .easing('linear');
let za = new Animation(); let za = new Animation();
za.fill('none'); za.add(zi);
za.add(zi);//, zw);
if (this.scale > 1) { if (this.scale > 1) {
// Zoom out // Zoom out
@ -502,7 +501,7 @@ export class Slides extends Ion {
if (Math.abs(this.touch.x) > this.viewportWidth) { if (Math.abs(this.touch.x) > this.viewportWidth) {
// TODO what is posX? // 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); console.log('Setting on posx', this.touch.x);
} }
@ -594,16 +593,13 @@ export class Slides extends Ion {
*/ */
@Component({ @Component({
selector: 'ion-slide', selector: 'ion-slide',
inputs: ['zoom'],
template: '<div class="slide-zoom"><ng-content></ng-content></div>' template: '<div class="slide-zoom"><ng-content></ng-content></div>'
}) })
export class Slide { export class Slide {
private ele: HTMLElement; private ele: HTMLElement;
/**
* TODO @Input() zoom;
* @param {Slides} slides The containing slidebox.
* @param {ElementRef} elementRef TODO
*/
constructor( constructor(
elementRef: ElementRef, elementRef: ElementRef,
@Host() slides: Slides @Host() slides: Slides
@ -620,9 +616,8 @@ export class Slide {
*/ */
@Directive({ @Directive({
selector: 'slide-lazy', selector: 'slide-lazy',
host: {
'class': 'swiper-lazy'
}
}) })
export class SlideLazy { export class SlideLazy {}
constructor(elementRef: ElementRef) {
elementRef.nativeElement.classList.add('swiper-lazy');
}
}