ionic3

Autosize textarea with max 5 line limit, then show scrollbar

元气小坏坏 提交于 2019-12-11 04:19:27
问题 Explanation: In Angular 2, on my chat screen, I want to increase the size of my chat screen as I type, to max 5 lines and then show scrollbar. How do I do it? Problem: Not behaving as expected. Scrollbar limit to 5 lines needs here, ideally contract, expand not working. Requirement: It should expand as I type and contract as I press backspace. After 5 lines it should show scrollbar. My code: home.ts autogrow(){ let textArea = document.getElementById("textarea") textArea.style.overflow =

Recording and playing back audio on Ionic 3

旧巷老猫 提交于 2019-12-11 04:12:32
问题 I am having a weird issue on iOS. I am using the Ionic Native Media plugin to record audio and trying to play the recording back using the HTML5 Web Audio API (WavesurferJS or HowlerJS). After I record the audio if I try to play the recording back immediately the audio will not play, but if I close the app and then re-open it, the audio will play fine. The error that HowlerJS is throwing is "error decoding the audio." My thoughts are the Native Media plugin has not fully released the file,

How to refresh a page on Ionic 3 (Ionic, Angular 5)

旧时模样 提交于 2019-12-11 04:05:35
问题 I’m building a favorite list which I can erase list items within a page. It’s based on Ionic sqlite storage. I found Ionic page will keep removed ion list items until I re-enter the list page. So it needs refreshing a page upon removing an item from ionic storage. How can I refresh a particular page? window.location.refresh() seems to refresh the entire pages… this is not what I’m trying to do. I need to refresh a single page out of twenty pages on my app so navCtrl.setRoot() will not work

How to pass some text or paragraph from a page to another page

时光总嘲笑我的痴心妄想 提交于 2019-12-11 03:35:46
问题 The building name and the building address should pass into the next page dynamically at the top red corner which is the areaPage. I hope you guys takes time to answer this. thank you for your future answers and god bless home.ts(project sites) <ion-content> <div class="banner"> <p>Project Sites</p> </div> <ion-content class="card-background-page"> <ion-card> <img src="assets/imgs/2.JPG"> <div class="card-title">Building Name</div> <div class="card-subtitle">Building Address</div> <div class=

Ionic error: Generators are only available for Ionic 2 projects

谁说我不能喝 提交于 2019-12-11 03:08:02
问题 Running $ ionic generate page pageName results in the error: Generators are only available for Ionic 2 projects (CLI v2.2.2) Your system information: Cordova CLI: 7.0.1 Ionic Framework Version: 2.3.0 Ionic CLI Version: 2.2.2 Ionic App Lib Version: 2.2.1 Ionic App Scripts Version: 1.1.4 ios-deploy version: 1.9.1 ios-sim version: 5.0.13 OS: macOS Sierra Node Version: v8.0.0 Xcode version: Xcode 8.3.3 Build version 8E3004b This is in what started as an ionic v2 project, but I thought I had

Ionic app fails to launch after adding phonegap-plugin-push plugin

北战南征 提交于 2019-12-11 02:44:26
问题 My Ionic app stucks at splashscreen, after my attempt to add phonegap-plugin-push plugin following guides here: https://ionicframework.com/docs/native/push/ I tried remove and adding platforms, removing and adding phonegap-plugin-push plugin, the outcome is consistent - as long as the push plugin is added into my project, the app silently fails at launching screen without error. Here is the code at app.component.ts: constructor( public events: Events, public userData: UserData, public menu:

How to fix problem due to providing '@ionic-native/AppVersion' or '…/ngx' and having exception when calling any methods of AppVersion?

非 Y 不嫁゛ 提交于 2019-12-11 02:28:23
问题 I've added the AppVersion Ionic native plugin (https://ionicframework.com/docs/native/app-version#usage). After try to provide it into my app.module.ts i've an error at compilation like "No provider exists for AppVersion" ... I thinking that maybe from Ionic 4/recent version of AppVersion, i need to follow this instructions : https://ionicframework.com/docs/native/#Add_Plugins_to_Your_App_Module which say to provide the plugin into the app.module.ts with a import like this : import AppVersion

Promise retries until success/failure with Typescript

家住魔仙堡 提交于 2019-12-11 01:46:13
问题 My mobile app uploads several files to the server in succession, often from remote areas with questionable connection strength. For this reason, I want to make a few attempts to send the file. I also want to move on and attempt the next one in the event of a failure, with all error messages displayed at the end of the export (ie "10 files uploaded, 3 failed...") However, I'm having trouble figuring out the recursive retry pattern with promises. Here's what I have so far: sendFile(params,

Searchbar with filter from JSON data with Ionic 3

不羁的心 提交于 2019-12-11 00:56:51
问题 I would like to have a search bar that filters the results based on the name of the book, I tried to do it but it does not work. When I'm looking for something, nothing happens, no mistake, so I'm wrong, but I do not know what, I'm new to typescript and I ask for help. Thanks in advance this is my page.html : <ion-content padding> <ion-searchbar placeholder="Filter Items" (ionInput)="getItems($event)"></ion-searchbar> <ion-grid> <ion-row> <ion-col *ngFor="let item of items"> <ion-card-header>

Why ionic-native/contacts plugin crash the app when try to save contact at android 8?

二次信任 提交于 2019-12-11 00:40:59
问题 I try to save contact using ionic-native/contacts plugin , it works on all android versions except android 8, the app is stopped and closed. This is my code which is the same of ionic framework example: SaveToContact(phone, name) { try { let contact: Contact = this.contacts.create(); contact.name = new ContactName(null, name, ''); contact.phoneNumbers = [new ContactField('mobile', phone)]; this.global.presentToast('Will Save!'), contact.save().then( () => this.global.presentToast('Contact