same problem, When I focus an which is positioned lower than the height of the keyboard, the input is getting hidden by the keyboard when I type its come above to keyboard
I am expecting the input to get scrolled up above the keyboard when i focus the input. any solution iāam stuck on it
import {Component, ViewChild} from '@angular/core';
import {AlertController, Platform, ionicBootstrap, Events, Nav, MenuController,Storage, LocalStorage} from 'ionic-angular';
declare var cordova:any;
declare var window:any;
@Component({
templateUrl: ābuild/app.htmlā,
pipes: [TranslatePipe],
config: {
// These options are available in ionic-angular@2.0.0-beta.2 and up.
scrollAssist: false, // Valid options appear to be [true, false]
autoFocusAssist: false // Valid options appear to be ['instant', 'delay', false]
}, // http://ionicframework.com/docs/v2/api/config/Config/
providers: [ UserData, ParamsData ,ContactData, CustInfoData, RegionData, UserService, Constants]
})
export class MyApp {
storage = new Storage(LocalStorage);
;
rootPage:any;
@ViewChild(Nav) nav: Nav;
//rootPage:any = MobileNumberPage;
pages: Array<{icon: any, title: string, component: any}>
constructor(private platform:Platform,
private translate: TranslateService,
menu: MenuController,
private userData : UserData,
private contacts : ContactData,
private CONSTANTS: Constants) {
menu.enable(true);
// used for an example of ngFor and navigation
this.pages = [
{icon: 'md-speedometer', title: 'Dashboard', component: HomePage },
{icon: 'md-exit', title: 'Logout', component: LoginPage }
];
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();
if (window.cordova && window.cordova.plugins.Keyboard) {
// This requires installation of https://github.com/driftyco/ionic-plugin-keyboard
// and can only affect native compiled Ionic2 apps (not webserved).
cordova.plugins.Keyboard.disableScroll(true);
}
});
this.translateConfig();
}
ionicBootstrap(MyApp, [[provide(TranslateLoader, {
useFactory: (http: Http) => new TranslateStaticLoader(http, 'assets/i18n', '.json'),
deps: [Http]
}),
TranslateService]], {scrollAssist: false, autoFocusAssist: false
});
i tried this solution i get this error
TypeScript error: app/app.ts(34,3): Error TS2345: Argument of type '{ templateUrl: string; pipes: typeof TranslatePipe[]; config: { scrollAssist: boolean; autoFocusA...' is not assignable to parameter of type '{ selector?: string; inputs?: string[
]; outputs?: string[]; properties?: string[]; events?: strin...'.
Object literal may only specify known properties, and 'config' does not exist in type '{ selector?: string; inputs?: string[]; outputs?: string[]; properties?: string[]; events?: strin...'.
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0-beta.37
Ionic App Lib Version: 2.0.0-beta.20