refactor(action-sheet): restructure action-sheet, move controller to separate module

restructure action-sheet, move controller to separate module
This commit is contained in:
Dan Bucholtz
2017-03-02 14:39:19 -06:00
parent c144580a49
commit 42a0c7fa61
3 changed files with 185 additions and 174 deletions

View File

@ -3,7 +3,7 @@ import { Component, ElementRef, HostListener, Renderer, ViewEncapsulation } from
import { assert } from '../../util/util';
import { BlockerDelegate, GestureController, BLOCK_ALL } from '../../gestures/gesture-controller';
import { Config } from '../../config/config';
import { Key } from '../../platform/key';
import { KEY_ESCAPE } from '../../platform/key';
import { Platform } from '../../platform/platform';
import { NavParams } from '../../navigation/nav-params';
import { NavOptions } from '../../navigation/nav-util';
@ -135,11 +135,9 @@ export class ActionSheetCmp {
@HostListener('body:keyup', ['$event'])
keyUp(ev: KeyboardEvent) {
if (this.enabled && this._viewCtrl.isLast()) {
if (ev.keyCode === Key.ESCAPE) {
console.debug('actionsheet, escape button');
this.bdClick();
}
if (this.enabled && ev.keyCode === KEY_ESCAPE && this._viewCtrl.isLast()) {
console.debug('actionsheet, escape button');
this.bdClick();
}
}