I am trying to implement a download href from an ion-item-option and cannot seem to make it work at all. Am I doing something stupid, I can’t see my mistake?
<ion-item-options>
<ion-item-option *ngIf="browserMode" href="http://device.local:8080/api/v1/log?download&folder=current" download>
<ion-icon slot="icon-only" name="download"></ion-icon>
</ion-item-option>
</ion-item-options>
browserMode is true for non android/iOS platforms.
If I create the same href as a link wrapping some text inside a label it works fine but that breaks my UI scheme so I’d prefer to avoid that.
The documentation includes the href and download options and that would imply it should work.
My configuration is below:
Ionic:
Ionic CLI : 6.16.3 (/Users/me/.nvm/versions/node/v10.16.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.6
@angular-devkit/build-angular : 0.1102.12
@angular-devkit/schematics : 11.2.12
@angular/cli : 11.2.12
@ionic/angular-toolkit : 3.1.1
Cordova:
Cordova CLI : 10.0.0
Cordova Platforms : 6.0.0, browser
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 10 other plugins)
Utility:
cordova-res (update available: 0.15.3) : 0.11.0
native-run (update available: 1.4.0) : 1.2.1
System:
Android SDK Tools : 26.1.1 (/Users/me/Library/Android/sdk)
ios-deploy : 1.10.0
NodeJS : v10.16.0 (/Users/me/.nvm/versions/node/v10.16.0/bin/node)
npm : 6.9.0
OS : macOS Big Sur
Xcode : Xcode 12.5 Build version 12E262
1 post - 1 participant