NavController doesn’t work in Ionic 4

Now, to complete the final step and implement those routes in our app-routing.module.ts file, they would look like this: const routes: Routes = [ { path: ”, redirectTo: ‘/home’, pathMatch: ‘full’ }, { path: “https://stackoverflow.com/questions/51828017/home”, loadChildren: ‘./pages/home/home.module#HomeModule’ }, { path: ‘products’, loadChildren: ‘./pages/products/products.module#ProductsModule’}, { path: ‘products/:id’, loadChildren: ‘./pages/product-detail/product-detail.module#ProductDetailModule’ }, { path: ‘products/categories’, loadChildren: ‘./pages/product-categories/product-categories. { … Read more

Ionic 4 Events not working in device but working on browser

To update Data from one page to other we used Events library. but events are no longer available in ionic 5. blow is the solution. run command: ionic generate service events // this will create events provider copy paste blow code. import { Injectable } from ‘@angular/core’; import {Subject} from ‘rxjs’; @Injectable({ providedIn: ‘root’ }) … Read more

Handling hardware back button in Ionic3 Vs Ionic4

Update: This was fixed in v4.0.0-beta.8 (dfac9dc) Related: ionic4 replacement for registerBackButtonAction This is tracked on GitHub, in the Iconic Forum and Twitter Until there is an official fix, you can use the workaround below. Using platform.backButton.subscribe (see here) platform.backButton.subscribeWithPriority(0, …) to let ionic handle closing all the modals/alerts/… , the code ionic uses when … Read more

Http.get() working but not working in build(Release/Debug) in Ionic 4

I am Guessing that your are getting this because of android changes its http architecture. to make it working on Android go to your project root folder. yourAppFolder > resources > android > xml > network_security_config.xml Change your network security config to blow code. <?xml version=”1.0″ encoding=”utf-8″?> <network-security-config> <base-config cleartextTrafficPermitted=”true”> <trust-anchors> <certificates src=”https://stackoverflow.com/questions/59306640/system” /> </trust-anchors> … Read more

Getting “Uncaught (in promise): TypeError: Object(…) is not a function” Error from Ionic-native VideoEditor Plugin

It seems ionic team has made some changes to their native plugins. You need to install the correct version of the native plugin corresponding to your project type. And import it correctly based on your angular version. All you need to do is, Check your project type in ionic.config.json file. If the type is “ionic-angular“, … Read more

I want to create a color picker in ionic app [closed]

here is example for you Credit for https://stackblitz.com/@bockoblur import import { ColorPickerModule } from ‘ngx-color-picker’; @NgModule({ bootstrap: [ AppComponent ], declarations: [ AppComponent ], imports: [ BrowserModule, ColorPickerModule ] }) .html <input [style.background]=”colorList[0].value” [(colorPicker)]=”colorList[0].value” [cpOKButton] = “true” [cpOKButtonText] = “‘Select'” [cpCancelButton] = “true” [cpSaveClickOutside] = “‘false'” [cpDisableInput]=”false” [cpAlphaChannel]=”‘disabled'” [cpOutputFormat]=”‘hex'” [cpPresetColors]=”presetValues” [cpAddColorButton]=”true” />