ionic-popup

Ionic ion-modal height with keyboard bug

一个人想着一个人 提交于 2020-06-17 07:19:07
问题 I have a ion modal which i want to show of 60% of my screen, but when keyboard appears the modal resizes to 60% of the screen (including keyboard) so it shrinks a lot. I want the modal to stay the same size (ideally the size of its contents). Pictures explain a lot. This is the css .ion-modal.modal { width: 90%; min-height: 0 !important; height: 60% !important; top: 5%; left: 5%; right: 5%; bottom: 5%; background-color: #fff; -webkit-box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); box-shadow:

$ionicPopup.show buttons onTap function not getting coverage in Angular Jasmine Unit Test

走远了吗. 提交于 2019-12-25 01:53:08
问题 When I call the outOfMvp() function in my unit test spec file, everything inside the function is getting coverage except for the onTap function. I was wondering how to get coverage in my unit test for the button's onTap function which is in a JSON object being passed in $ionicPopup.show() method? Here is the function in the js file: function outOfMvp(data) { environmentConfig.isScanDataReadValid = false; popup = $ionicPopup.show({ title: kioskConstants.POPUP_WORDING.OUT_OF_MVP_RETURN.title,

How do I interact with items in the background in ionic while a popover is active?

半世苍凉 提交于 2019-12-24 00:57:30
问题 Ionic Version: 1.x Platform: all I have an ionic app which uses an ionic popover. However, when the popover is active (open), I can no longer interact with things in the background, for example scroll down my list of items. I have tried looking for existing answers for this question, but did not see the question being asked. The popover itself does not have to be bound to any active element on the page, since it currently has position:fixed and will always appear in the same position. So

Ionic: How is it possible to change the width of $ionicPopup?

孤街醉人 提交于 2019-12-13 07:01:59
问题 I'm trying to change the width of $ionicPopup; I've tried using the following css code, to import it onto cssClass: my-popup : .my-popup { width: 400; } But that didn't seem to work. I've really got stuck there, and currently unable to find a solution. Any help will be much appreciated. Thank you. 回答1: Place the following in the src/theme/variables.scss file; $popover-ios-width: 300px; 回答2: It's actually quite straight forward, see the following example: var pinPopup = $ionicPopup.show({

How create an input box having a + and - button in Ionic

北战南征 提交于 2019-12-03 13:18:54
问题 How I can create an input box having a + and - button. Clicking upon which user can change the quantity of product selected, like this screen: 回答1: Here's a quickly thrown together example for Ionic 2. If you are using Ionic 1 you should be able to adapt it pretty easily. You just need a couple controller/class functions to increment and decrement, then call those on tap from the buttons. This example covers just one button, so something like this wrapped in an ngFor or a <ion-list> page.ts:

How create an input box having a + and - button in Ionic

我的梦境 提交于 2019-12-03 03:22:21
How I can create an input box having a + and - button. Clicking upon which user can change the quantity of product selected, like this screen: Here's a quickly thrown together example for Ionic 2. If you are using Ionic 1 you should be able to adapt it pretty easily. You just need a couple controller/class functions to increment and decrement, then call those on tap from the buttons. This example covers just one button, so something like this wrapped in an ngFor or a <ion-list> page.ts: private currentNumber = 0; constructor () { } private increment () { this.currentNumber++; } private

Ionic 2 Alert customization

社会主义新天地 提交于 2019-11-29 08:39:34
I want to customize my alerts in Ionic 2. I know that I can do it globally in the variables.scss, but I want to modify a specific one, in a specific page. I tried cssClass in the alert code, I tried other different things, that work, but globally, not for a specific one. Is there any way to do it? Edit all your AlertController.create methods to look like this: const alert = this.alertCtrl.create({ title: title, subTitle: msg, buttons: ['OK'], cssClass: 'alertCustomCss' // <- added this }); And add this to app.scss : .alertCustomCss { // text color for basic alerts color: white; // alert modal

Ionic 2 Alert customization

*爱你&永不变心* 提交于 2019-11-28 01:59:01
问题 I want to customize my alerts in Ionic 2. I know that I can do it globally in the variables.scss, but I want to modify a specific one, in a specific page. I tried cssClass in the alert code, I tried other different things, that work, but globally, not for a specific one. Is there any way to do it? 回答1: Edit all your AlertController.create methods to look like this: const alert = this.alertCtrl.create({ title: title, subTitle: msg, buttons: ['OK'], cssClass: 'alertCustomCss' // <- added this }