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 307 additions and 442 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,

View File

@ -34,8 +34,6 @@ You can combine the `ionSwipe` event plus the `expandable` directive to create a
| Method | Description |
| ---------------- | ----------- |
| `fireSwipeEvent` | |
| `isEndSide` | |
| `width` | |
----------------------------------------------