Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70440 articles
Browse latest View live

Load different templates from one component

$
0
0

@Kyrax80 wrote:

I have a component which displays its elements differently depending on the user’s screen. Which means the .html (template) is different for the web and mobile.

So, is there a way to load a template or another in some way? I want to do this by just using 1 component. I don’t like the idea of creating two components that will do basically the same.

Thanks!

Posts: 1

Participants: 1

Read full topic


Cross-Origin Read Blocking (CORB) blocked cross-origin response

$
0
0

@mark_bigrock wrote:

Hi

Hoping someone can help. When using JWT authentication with WordPress in a browser I am seeing a CORB error:

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://mysite/wp-json/jwt-auth/v1/token with MIME type application/json

When I login via a browser or Android it works okay i.e. it authenticates.

However when I try login via a simulator or Apple device I get this error:

2019-07-17 16:34:05.530696+0100 MyApp[14743:3057062] Http failure response for https://mysite/wp-json/jwt-auth/v1/token: 0 Unknown Error

Any help would be greatly appreciated.

Thanks Mark

Posts: 1

Participants: 1

Read full topic

Ionic 4 slow performance in android

$
0
0

@asaldev wrote:

Hi
in browser work very good but when i run in android it’s so slow ( i’m not test it in ios )

Posts: 1

Participants: 1

Read full topic

Ionic storage update

$
0
0

@evripides wrote:

Hello

I am using Ionic storage to save id,title,website in json
Now I want to edit them how can Inedit the ionic storage?

Thanks

Posts: 1

Participants: 1

Read full topic

Cors issue in Ionic 5

$
0
0

@mackiconicappp wrote:

I am newbie for Ionic. I am trying to post data using api through ionic. When I post data to a local file it is working But it could not post data to any external link.

Please suggest me any way so that I could resolve it.

Posts: 1

Participants: 1

Read full topic

Ionic V4 and PouchDB example

Light / Dark theme and Ionic Storage

$
0
0

@kendricktimms wrote:

I’m trying to do a project with light and dark mode and I thought that the best idea will be saving a key on Ionic Storage and based on that key to show the users their favorite mode (light or dark mode). I’m setting a default key on ionic/storage named “theme” with the value false so the mode will be light but if i want to change the value to true the mode needs to be dark so the next time I enter my theme will be based on my value on storage so i don’t need to change it everytime. The problem is that I tried to do this but the value won’t change instantly but I need to refresh the page in order to change the value. So I’m asking if there is any chance that I can do this with Ionic/Storage or maybe you know any better idea. Thank you

Posts: 1

Participants: 1

Read full topic

Writing files with commas in the string - resulting file is truncated at the comma

$
0
0

@duncansayers wrote:

Using capacitor filesystem plugin, when trying to do this:

Filesystem.writeFile({
      data: 'data,that,contains,commas',
      path: fileName,
      directory: FilesystemDirectory.Documents       
    }).then((result) => {
...
});

…the text written to the file is

that

Any ideas?

Thanks.

Posts: 1

Participants: 1

Read full topic


Build Android/iOS Mobile Apps using Ionic 4 React.js Capacitor

Subscribe set Global Variables

$
0
0

@FoxDev wrote:

Hey guys,
i do get my Coupons over a subscribe function which is called when i initialize my page.

  private Initialize() {
    
    let id = this.activatedRoute.snapshot.paramMap.get('id');
    
    console.log("id: " + id);
    if (id) {
      this.CouponSubscription = this.couponController.GetCouponsByEmail('info@foxdev.ch').subscribe(res => {
        console.log(res);

        this.Coupon = res.find(x => x.id === id);
        //console.log(this.Coupon.DateOfRedeem.toMillis());
        this.isRedeemed = this.Coupon.DateOfRedeem.toMillis() != 0;
        this.isVaildDate = this.Coupon.DateOfActivation.toMillis() <= Date.now() && this.Coupon.DateOfExpiration.toMillis() >= Date.now();
      }); 
    }
  }

But the do not get set there because the object is undefined. Do i have to wait for these get loaded?
Can somebody help me?
Thanks

Posts: 1

Participants: 1

Read full topic

TypeError: Object(...) is not a function when i'm integrate map

$
0
0

Ionic 3 default keyboard display number on textarea (Android)

$
0
0

@jason3329 wrote:

Hi all , may i know how to display number keyboard on textarea?

i want default keyboard pop up will be like below image.(Android)

image

Posts: 1

Participants: 1

Read full topic

Production mode

$
0
0

@Pedrosss wrote:

When i use --prod flag to build my ionic 4 application to android, it seems that it does not load plugins.
Exactly i detected @ionic/storage promise not returning nothing. Any ideas? Thanks in advance

Posts: 1

Participants: 1

Read full topic

Execution failed for task ':app:mergeReleaseResources' when doing --release --prod build

$
0
0

@EuanDScott wrote:

Hey All

I am having a problem when trying to do a release build for my Android App so that I can upload it to the Play Store. When I run the following command: ionic cordova build --release --prod android I get the following error 'Execution failed for task ‘:app:mergeReleaseResources’.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #7: Unexpected error during compile ‘C:\projects…\platforms\android\app\src\main\res\drawable-port-xxxhdpi\screen.png’, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.’

From what I have been able to find on the web, this is due to the splash image being to large. please see the following -https://stackoverflow.com/questions/56450884/execution-failed-for-task-appmergereleaseresources-when-using-ionic-build-wi

Has anybody encountered this issue before and how could I resolve it?

Full terminal output from failure on wards:
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:mergeReleaseResources’.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #7: Unexpected error during compile ‘C:\projects…\platforms\android\app\src\main\res\drawable-port-xxxhdpi\screen.png’, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 19s
Exception in thread “ForkJoinPool.commonPool-worker-0” java.lang.IllegalStateException: AAPT Process manager cannot be shut down while daemons are in use
at com.android.builder.internal.aapt.v2.Aapt2DaemonManager.shutdown(Aapt2DaemonManager.kt:96)
at com.android.build.gradle.internal.res.namespaced.RegisteredAaptService.shutdown(Aapt2DaemonManagerService.kt:61)
at com.android.build.gradle.internal.workeractions.WorkerActionServiceRegistry$shutdownAllRegisteredServices$1$1.run(WorkerActionServiceRegistry.kt:96)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
32 actionable tasks: 30 executed, 2 up-to-date
C:\projects…\android\gradlew: Command failed with exit code 1 Error output:
Note: C:\projects…\platforms\android\CordovaLib\src\org\apache\cordova\engine\SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:mergeReleaseResources’.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #7: Unexpected error during compile ‘C:\projects…\platforms\android\app\src\main\res\drawable-port-xxxhdpi\screen.png’, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 19s
Exception in thread “ForkJoinPool.commonPool-worker-0” java.lang.IllegalStateException: AAPT Process manager cannot be shut down while daemons are in use
at com.android.builder.internal.aapt.v2.Aapt2DaemonManager.shutdown(Aapt2DaemonManager.kt:96)
at com.android.build.gradle.internal.res.namespaced.RegisteredAaptService.shutdown(Aapt2DaemonManagerService.kt:61)
at com.android.build.gradle.internal.workeractions.WorkerActionServiceRegistry$shutdownAllRegisteredServices$1$1.run(WorkerActionServiceRegistry.kt:96)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android --release exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

Ionic Info:

Ionic:
Ionic CLI : 5.2.3 (C:\Users…Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.5.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:
Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : not available
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 19 other plugins)

Utility:
cordova-res : 0.6.0
native-run : 0.2.8

System:
NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

Posts: 1

Participants: 1

Read full topic

What is the minimum iOS version supported by ionic 3?


Final Year Ionic Project Idea

$
0
0

@LKM96 wrote:

Hello guys. I am a final year ionic enthusiast. I am looking for a final year ionic project idea.
Help me guys

Posts: 1

Participants: 1

Read full topic

Cordova-plugin-background-mode not installing on android@6.2.3

$
0
0

@Harikag wrote:

Unable to install background-mode plugin

gives like below

ionic cordova plugin add cordova-plugin-background-mode

cordova plugin add cordova-plugin-background-mode --save
Installing “cordova-plugin-background-mode” for android
warn

please help me out

Posts: 1

Participants: 1

Read full topic

Not able to add platform with below ionic info

$
0
0

@Fit_Kannadiga wrote:

Ionic:

ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.1
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.3.0

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (1 plugins total)

System:

NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001

Posts: 1

Participants: 1

Read full topic

Ionic 4 select option

Documentation or examples for component property on ion-popover-controller

$
0
0

@vespinasgmailcom wrote:

I am trying to create a service method that renders a simple popover based on a list of possible string values, based on the popover sample provided in the documentation. In my method, I am creating a custom element this way:

customElements.define('ui-service-popover', class ModalContent extends HTMLElement {
  connectedCallback() { this.innerHTML = html; }
});  		

Where “html” is a string variable containing the list of options to be displayed. When I try to run this, I get an error indicating a provider for “ui-service-popover” does not exist.

Despite of that, I don’t think creating a custom element is the way to fo for me in this situation, since the element it self would change every time the method is called with a new set of options, so I wanted to explore other possibilities.

The Ionic documentation for app-popover-controller states that the component property on the create method accepts Function | HTMLElement | null | string values, but I haven’t be able to find any doc or example of how to pass other values than HTMLElement.

Any help here would be appreciated.

Posts: 1

Participants: 1

Read full topic

Viewing all 70440 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>