refactor(components): update to latest stencil api

This commit is contained in:
Adam Bradley
2017-07-25 10:03:07 -05:00
parent 69dfaad7b0
commit b8c0589513
91 changed files with 6199 additions and 4426 deletions

View File

@ -1,4 +1,5 @@
import { Component, h, VNodeData } from '@stencil/core';
import { Component } from '@stencil/core';
/**
* @name Slide
@ -17,7 +18,8 @@ import { Component, h, VNodeData } from '@stencil/core';
styleUrl: 'slide.scss'
})
export class Slide {
hostData(): VNodeData {
hostData() {
return {
class: {
'slide-zoom': true,

View File

@ -1,6 +1,7 @@
import { Component, h, Prop, Ionic } from '@stencil/core';
import { Component, Element, Prop } from '@stencil/core';
import { Swiper } from './vendor/swiper';
/**
* @name Slides
* @description
@ -29,7 +30,7 @@ import { Swiper } from './vendor/swiper';
})
export class Slides {
swiper: any;
$el: HTMLElement;
@Element() el: HTMLElement;
/**
* @input {string} The animation effect of the slides.
@ -168,7 +169,7 @@ export class Slides {
emitEvent(eventName: string) {
return (data: any) => {
Ionic.emit(this, eventName, data);
Core.emit(this.el, eventName, data);
};
}
@ -223,7 +224,7 @@ export class Slides {
if (!this._init) {
console.debug(`ion-slides, init`);
this.container = this.$el.children[0] as HTMLElement;
this.container = this.el.children[0] as HTMLElement;
var swiperOptions = {
height: this.height,