Hi,
I am trying to use the same font size in all devices, regardless of users font settings.
I imported this https://github.com/phonegap/phonegap-mobile-accessibility cordova plugin to disable user preferred text zoom but I can’t seem to get it to work.
Here is my code so far:
imports ...
declare var MobileAccessibility: any;
@Component({
...
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
rootPage = UsersPage;
pages: Array<{title: string, component: any}>;
constructor(
public platform: Platform,
public menu: MenuController,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
public deploy: Deploy,
) {
this.initializeApp();
this.pages = [
...
];
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
MobileAccessibility.usePreferredTextZoom(false);
});
}
openPage(page) {
// close the menu when clicking a link from the menu
this.menu.close();
// navigate to the new page if it is not the current page
this.nav.setRoot(page.component);
}
}
When I try to run it I get the following error:
Error: Uncaught (in promise): ReferenceError: MobileAccessibility is not defined
ReferenceError: MobileAccessibility is not defined
All help is appreciated.