本文整理匯總了TypeScript中ionic-angular.ViewController.isLast方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ViewController.isLast方法的具體用法?TypeScript ViewController.isLast怎麽用?TypeScript ViewController.isLast使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-angular.ViewController
的用法示例。
在下文中一共展示了ViewController.isLast方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: _keyUp
@HostListener('body:keyup', ['$event'])
private _keyUp(ev: KeyboardEvent) {
if (this.isEnabled() && this._viewCtrl.isLast()) {
if (ev.keyCode === 13) {
if (this.lastClick + 1000 < Date.now()) {
// do not fire this click if there recently was already a click
// this can happen when the button has focus and used the enter
// key to click the button. However, both the click handler and
// this keyup event will fire, so only allow one of them to go.
console.debug('alert, enter button');
let button = this.d.buttons[this.d.buttons.length - 1];
this.btnClick(button);
}
} else if (ev.keyCode === 27) {
console.debug('alert, escape button');
this.bdClick();
}
}
}