Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228598 articles
Browse latest View live

2 Side-Menus. Left-menu opens when clicking link from Right-menu

$
0
0

Corrections to my comment formatting below to show the tags properly.

I found the solution to this problem in the documentation. Each “ion-menu-toggle” element should have a “menu” attribute with the correct menuId defined to know which menu to toggle open or closed.

Left-side menu changes to each “ion-menu-toggle” element

<ion-menu-toggle menu="main">

Right-side menu changes to each “ion-menu-toggle” element

<ion-menu-toggle menu="user">

Ionic V5 Navigate back with parameters

$
0
0

Your probably right that passing a callback function to a route is not the best idea. I just expected a route to be the equivalent of an android activity, which would include some way of returning a value.

But i guess i still have to think of it as a web page.

Making component to wait until async operations in the provider constructor gets resolved

$
0
0

Thank you very much. This is a beautifully crafted piece of code. Can’t wait to play with it and adapt it for my ionic 3/storage needs.

Google Login error 10

$
0
0

@pullatjunaid I’m not exactly sure what would go in the debug-signing.properties file.
From where would I get
alias_name?
is my_key_password ‘android’
storeFile is the path to the actual debug.keystore?
what is my_store_password? My app isn’t in playstore yet. I’m just trying to test the google auth.

Can't solve ERR_CLEARTEXT_NOT_PERMITTED error on android device while connecting from localhost server ionic 4

Slide up drawer from bottom?

$
0
0

More featured implementation

Ionic 5 events from @ionic-angular is missing

$
0
0

Hi

I have updated my project to ionic 5. Now my code is broken because Events from @ionic-angular are missing.

export ‘Events’ was not found in '@ionic/angular

Please suggest the fix for this

Once downloaded, images not display in android gallery? in ionic 3..stuck from last two month... please help

$
0
0

lastly i have done this, cheers ! i have used the media scanner plugin to update the downloaded images in gallery. :grinning:

cordova.plugins.MediaScannerPlugin.scanFile("device image link");


Imagepicker for browser

$
0
0

Hi, you can use <input type="file" /> .
It works for both in mobile and browser. Here is small example:
html:

   <ion-button (click)="uploadFile()"> Upload & Preview </ion-button>
 <img [src]="imageURL ? imageURL : 'assets/dummy-profile-pic.png'" class="rounded mx-auto d-block img-thumbnail" alt="HA">
            <input type="file" *ngIf="!imageURL" (change)="fileChanged($event)" accept="image/*" class="filebtn" #fileButton  />

ts:

imageURL: any;
 @ViewChild('fileButton', { static: false }) fileButton;
constructor() {...}
 uploadFile() {
    this.fileButton.nativeElement.click();
  }
  fileChanged(event) {
    const files = event.target.files;
    console.log(files);
    const reader = new FileReader();
    reader.onload = () => {
      this.imageURL = reader.result;
    };
    reader.readAsDataURL(event.target.files[0]);
  }

Ionic App keeps stopping

$
0
0

Ionic app build is successful but app is not working after using capacitor fcm plugin and migrate to android x.
rsz_screenshot_from_2020-02-14_10-37-07

Ionic 5 events from @ionic-angular is missing

$
0
0

When you migrate to a new Major Release, you should read the Changelog and Breaking Changes correctly. See here:

The @ionic/angular Events service has been removed.

Input File Picker not working

$
0
0

Hi, you can use <input type="file" /> .
It works for both in mobile and browser. Here is small example:
html:

   <ion-button (click)="uploadFile()"> Upload & Preview </ion-button>
 <img [src]="imageURL ? imageURL : 'assets/dummy-profile-pic.png'" class="rounded mx-auto d-block img-thumbnail" alt="HA">
            <input type="file" *ngIf="!imageURL" (change)="fileChanged($event)" accept="image/*" class="filebtn" #fileButton  />

ts:

imageURL: any;
 @ViewChild('fileButton', { static: false }) fileButton;
constructor() {...}
 uploadFile() {
    this.fileButton.nativeElement.click();
  }
  fileChanged(event) {
    const files = event.target.files;
    console.log(files);
    const reader = new FileReader();
    reader.onload = () => {
      this.imageURL = reader.result;
    };
    reader.readAsDataURL(event.target.files[0]);
  }

Ionic App keeps stopping

$
0
0

Hi, you have to debug your ionic app with chrome developer tool and then you can get the error of what is going wring with the startup. Or try checking and commenting the code which runs when the app start. Hope you will get the idea of what I am saying about.

How to refresh a page after login.?

$
0
0

how refresh a page after navigation using
this.router.navigate([‘home’]); ???
what code should i need to add for the same as after logged in successfully i want to refresh my homepage.

QR Reader on Ionic React

$
0
0

Hi, use cordova qr reader plugin from the ionic official website, here:


Ionic5 prod build fails

$
0
0

Hi, you can use --aot instead of --prod like:
ionic cordova build android --aot

How to refresh a page after login.?

Ionic 5 events from @ionic-angular is missing

$
0
0

Use Observables instead. They support typing, so you can write more expressive and bug-resistant code. They are named properties, so typos can get caught, unlike Events with their string constants. They can be scoped, making more testable code whose boundaries are more clearly delineated. Not to mention getting all the RxJS operators to play with.

How to refresh a page after login.?

$
0
0

you can use ionViewWillEnter() function in the home page and add some function there to run it, like:
ionViewWillEnter() { this.someFUnction(); }
and the function you will call in ionViewWillEnter will simply update some variable which you wanted to be.

How to refresh a page after login.?

$
0
0

I wants to refresh the home page because after success of login it will go to home page and i don’t know what is the issue but after log in menu is not opening but if i refresh browser menu works fine.

Viewing all 228598 articles
Browse latest View live