ionic4

Ionic 4: Hardware Back Button Reloading Application

徘徊边缘 提交于 2019-12-07 03:19:20
问题 Working on a Project and stuck in an Issue: Hardware Back Button Reloading Application (I am using Angular Router in this application). My Code to Exit Application: ionViewDidEnter(){ this.subscription = this.platform.backButton.subscribe(()=>{ navigator['app'].exitApp(); }); } ionViewWillLeave(){ this.subscription.unsubscribe(); } While same logic Working in other applications. but in this application its reloading the application not exiting it. P.S: i have also tried it to put in platform

Passing Data between pages from url

自古美人都是妖i 提交于 2019-12-07 02:32:30
问题 I am working on ionic 4 project. My project is getting data json from url using input search . l want passing data when users is click on any items to show them another page for more details . l tried with this code but l get undefined value ! this code is holding search operation export class FlightsearchPage { public search = '' public flight : any filterItems:any; callsign : any; constructor(private http: HTTP, public loadingController: LoadingController, private nav : NavController) {

Ionic 4 + Angular 6 PWA Styles not working / broken

試著忘記壹切 提交于 2019-12-06 16:55:50
Hope someone can help me here, I have an Ionic 4 app using Angular 6 pwa. I have followed the steps in this post to get it working https://www.joshmorony.com/create-a-pwa-with-angular-service-workers-in-ionic-4/ All the steps complete fine and also the package builds and runs correctly without errors. However all my control specific styles are missing e.g my-controll.component.scss app-my-contol { ion-content { background-color: var(--light-gray-lightest); } .my-class { padding:0; list-style: none; position: absolute; width: 100%; left: 0; } } You can see that the files are hashed correctly

ionic 4 app shows white screen on ios with error code 1100

故事扮演 提交于 2019-12-06 14:08:02
问题 I recently had to rename the ios app so ended up removing and re-adding the ios platform. but after that now the app runs on device and emulator with a blank screen. This comes after the splash screen is gone. Looking into IOS logs in xcode it shows: 2019-04-30 17:17:40.679217-0700 Scan Buddy[31529:12197837] Multi-tasking -> Device: YES, App: YES 2019-04-30 17:17:40.702973-0700 Scan Buddy[31529:12197837] Using UIWebView 2019-04-30 17:17:40.703804-0700 Scan Buddy[31529:12197837] [CDVTimer]

How do I disable/remove ion-ripple effect in ion-button Ioinic 4?

偶尔善良 提交于 2019-12-06 13:40:28
I need to disable the default ion-ripple-effect in the `ion-button'. <ion-button> <ion-icon slot="icon-only" name="star"></ion-icon> </ion-button> I can't disable the pointer-events as I need it. PS: I've referred the following posts and could not find a proper solution for Ionic 4. How to remove click effect of an ion-item Disable ripple effect on element I think it's only included with Android so you can set mode="ios" on the button to avoid that effect. Yeah so I just checked the source code and it is only used with mode="md" (which is Android / Material Design): <TagType {...attrs} class=

Ionic application is not working on 4.4 and 5.1?

我与影子孤独终老i 提交于 2019-12-06 13:27:26
问题 Ionic 4/3 application is showing white screen on Android Kitkat 4.4 and lolipop 5.1. My application is not working on kitkat and lolipop. I have installed on another android version but it is working fine. This is me config file <?xml version='1.0' encoding='utf-8'?> <widget id="com.novapex.myTestApp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Test App</name> <description>An awesome Ionic/Cordova app.</description> <author email=

Not able to show the logout button immediately after the user login in Ionic 4

六眼飞鱼酱① 提交于 2019-12-06 12:46:10
I am working in my Ionic 4 app and I have made the login/register system. When the user login, after that the user will able to visit the page and when the user is not login and try to visit the page, it will get redirect to the login page. This is my userlogin.page.ts : async UserLoginDetails($soctype, $socid) { const loading = await this.loadingController.create({ message: 'Please Wait', duration: 1100, translucent: true, }); await loading.present(); const userdetailslogin = { email: this.userlogindet.value.email, password: this.userlogindet.value.password, social_type: $soctype, social_id:

Ionic4 capacitor android livereload?

回眸只為那壹抹淺笑 提交于 2019-12-06 11:58:05
Is there posibility to run ionic4 app with capacitor on android device with livereload? I was looking for answear for a few hours now without a luck. Please help. You can do it by adding the server object to the capacitor.config.json file, just use the url of your live reload server "server": { "url": "http://192.168.1.33:8100" } You can use the ionic cli for this: ionic capacitor run android --livereload For example. Source: https://ionicframework.com/docs/cli/commands/capacitor-run You can use the following command to livereload without specifying the IP address: ionic capacitor run android

Ionic 4 routing with angular 6

蓝咒 提交于 2019-12-06 09:45:17
问题 Im trying to update a legacy ionic app to v4 at the moment but cant seem to find a v4 equivalent to this navigation return this.app.getRootNav().setPages([ {page: Profile}, {page: SettingsPage, params: {id: userId}} ]) 回答1: Ionic4 and angular version of your request is like this : this.router .navigate(["/page1"], { replaceUrl: true }) .then(() => this.router.navigate(["/page2"])); The logic is here as i understand. Push page1 into history but navigate to page2 so if user pushes the back

Programmatically scroll ion-segment

…衆ロ難τιáo~ 提交于 2019-12-06 03:55:19
Is there any way to control scrolling on segments? In my case the slider and segments depends on each other and when you swipe slides, overflowwing segments does not slide, but active segment will be correctly choosed My view and controller code: <ion-segment scrollable mode="md" (ionChange)="segmentChanged()" [(ngModel)]="segment" color="warning"> <ion-segment-button mode="md" value="0"> <p>Description</p> </ion-segment-button> <ion-segment-button mode="md" value="1"> <p>Interconnections</p> </ion-segment-button> <ion-segment-button mode="md" value="2"> <p>Declensions</p> </ion-segment-button