Skip to content

Instantly share code, notes, and snippets.

@levymetal
Last active November 1, 2022 02:47
Show Gist options
  • Save levymetal/bf384338d61688183cc68cc32d724d41 to your computer and use it in GitHub Desktop.
Save levymetal/bf384338d61688183cc68cc32d724d41 to your computer and use it in GitHub Desktop.
How to show the keyboard accessory bar in Ionic 2.0.0-rc.1. Full blog post here: http://christianvarga.com/how-to-show-the-ios-keyboard-accessory-bar-in-ionic-2-0-0-rc-1/
import { StatusBar, Splashscreen, Keyboard } from 'ionic-native';
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar, Splashscreen, Keyboard } from 'ionic-native';
@Component({
template: `<ion-nav [root]="rootPage"></ion-nav>`
})
export class myApp {
rootPage = TabsPage;
constructor(platform: Platform) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
Keyboard.hideKeyboardAccessoryBar(false);
});
}
}
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment