ionic-framework

Ionic Vertical Scrolling Not Working in Tabbed Content

笑着哭i 提交于 2020-01-04 15:19:29
问题 I've setup a series of tabs with ion-views for content. The content is displayed properly in each tabbed route, but the tabbed content doesn't scroll vertically and the list runs off the page making it inaccessible. Are tabs not supposed to be scrolled? The docs indicate scrolling is supposed to be turned on by default for ion-content. INDEX <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device

ionic 3 -Keyboard pushes the whole screen up

不羁岁月 提交于 2020-01-04 14:14:28
问题 I build ionic 3 app. I have inputs field and when I press on them to begin to type anything the screen changed.. before when I press on any input field the screen changed(it's test also in real device) 回答1: You can fix this problem by adding this style to app.scss: ion-grid { min-height: 100%; } The keyboard resizes Ionic's grid system if you didn't define its minimum height. 回答2: Take a look at the native keyboard to prevent the keyboard from pushing things up. keyboard.disableScroll(bool);

Cordova- how to hide virtual navigation buttons on Android?

五迷三道 提交于 2020-01-04 14:01:52
问题 I would like to hide in my app virtual navigation button for devices which does not have analog buttons (see image below). How can i do it in Cordova (Ionic) please? 回答1: I found this cordova plugin cordova-fullscreen-plugin can help you.But it only support Android 4.4+. // Hide system UI and keep it hidden (Android 4.4+ only) AndroidFullScreen.immersiveMode(successFunction, errorFunction); And your question is duplicate with Making an Android app fullscreen with Cordova 来源: https:/

How to download file to Download's directory with Ionic Framework?

牧云@^-^@ 提交于 2020-01-04 13:36:57
问题 I'm trying with ngCordova but the cordova.file.documentsDirectory property is null . I have also tried combining the use of ngCordova with requestFileSystem , but still, the file is not saved in the "Download's". Example of my code: window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(directory) { var fileTransfer = new FileTransfer(); fileTransfer.download( encodeURI("http://example.com/sample.pdf"), directory.root.nativeURL + 'sample.pdf', function(entry) { console.log("download

How to download file to Download's directory with Ionic Framework?

孤街浪徒 提交于 2020-01-04 13:36:47
问题 I'm trying with ngCordova but the cordova.file.documentsDirectory property is null . I have also tried combining the use of ngCordova with requestFileSystem , but still, the file is not saved in the "Download's". Example of my code: window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(directory) { var fileTransfer = new FileTransfer(); fileTransfer.download( encodeURI("http://example.com/sample.pdf"), directory.root.nativeURL + 'sample.pdf', function(entry) { console.log("download

How to detect platform using Ionic 4

廉价感情. 提交于 2020-01-04 09:48:09
问题 How to detect browser and mobileweb platform using Ionic 4 because when I tried with below code in desktop browser it is not falling in ‘core’ condition. if (this.platform.is('core')) { alert('core platform'); } else { alert('something else'); } When I have debug in chrome developer tool it showing 'android' platform as per below snapshot. Can anyone please help me how to detect platform in Ionic 4 or what can be the alternative for this? 回答1: The following link may help you: https://forum

How to add Android support to my Ionic app project?

泪湿孤枕 提交于 2020-01-04 09:37:19
问题 I have created an Ionic app project. I want to add Android support to my app. For that I used "ionic platform add Android. But my system shows some errors. I am using a windows machine. The errors showing in cmd is Adding android project... Running command: cmd "/s /c "C:\Users\SYSTEM-03\.cordova\lib\npm_cache\cordova-android\6.0.0\package\bin\create.bat E:\workspace\appstore\demoapp\platforms\android com.ionicframework.demoapp722446 demoapp --cli"" C:\Users\SYSTEM-03\.cordova\lib\npm_cache

Ionic 2 storage is not cleaning up on uninstall - Only for signed APK

若如初见. 提交于 2020-01-04 09:16:12
问题 I am using Ionic 2 storage for storing user credentials. On uninstalling the App, storage is not clearing so after re-installing, the App is picking up the user credential of the previous user. This issue is occurring only in signed APKs. Tested on samsung on7 and lenova vibe models. How to clear the storage on uninstall? what I am doing wrong? 回答1: Set android:allowBackup to false in AndroidManifest to XML 回答2: you should not need to do anything for this to happen. This looks like a bug in

Ng-submit and ng-click fires many times i ionic iPhone app

浪尽此生 提交于 2020-01-04 09:09:09
问题 I'm trying out the ionic framework and it looks really nice. However, I have a problem with form submission: the form fires twice. First when the submit button is pressed, and then if I just tap anywhere on the screen. This happens both in the xcode simulator and on my iphone 4gs. This is what I have done: I install the sidemenu template with: ionic start myApp sidemenu. I then simply paste this form in to the tab-dash template: <form ng-submit="createTask(task)"> <div class="list"> <label

How to restart ngOnInit to update Interpolation

隐身守侯 提交于 2020-01-04 09:03:34
问题 Is there way to restart ngOnInit() on change variable Because I want to restart ngOnInit() on change theme variable, this is my code Settings.ts export class SettingsPage implements OnInit{ phraseColor: string; ngOnInit() { let tch : {} = {'#3f51b5': 'Blue', '#ff9800': 'Orange'} let ColorName = tch[this.settingsService.theme]; /* here my problem */ this.phraseColor = ColorName; } changeTheme(){ this.settingsService.theme = '#ff9800'; } } Settings.html <div>Theme is {{ phraseColor }}</div>