refactor(all): make all method return a promise

This commit is contained in:
Manu Mtz.-Almeida
2018-08-28 18:16:10 +02:00
parent 5d32115684
commit 1d46973785
53 changed files with 304 additions and 439 deletions

View File

@ -26,23 +26,13 @@ export class ItemOptions {
*/
@Event() ionSwipe!: EventEmitter<void>;
@Method()
isEndSide() {
return isEndSide(this.win, this.side);
}
@Method()
width(): number {
return this.el.offsetWidth;
}
@Method()
fireSwipeEvent() {
this.ionSwipe.emit();
}
hostData() {
const isEnd = this.isEndSide();
const isEnd = isEndSide(this.win, this.side);
return {
class: {
'item-options-start': !isEnd,