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

'Push' and 'Firebase Analytics' plugin conflict

$
0
0

I got mostly an identical error message, with slightly different versions reported. I managed to get everything to compile by installing androidx and firebase messaging.

ionic cordova plugin add cordova-plugin-firebase-messaging
npm install @ionic-native/firebase-messaging
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter

note that I dont use the push plugin, but had the same issue happen because of an FCM dependency (cordova-plugin-fcm-with-dependecy-updated and ionic-native/fcm)


Ionic 4 & Angular 9

$
0
0

Ionic 5 is out now, so I’d give that a look.

After running npm update my app will not build

$
0
0

I discovered the problem in my app.component.ts file. I had the following erroneous import statements:

import { Component } from ‘@angular/core/core’;
import { Router } from ‘@angular/router/router’;

How to size a modal by ts file ionic 4

$
0
0

You could also let your modal grow as big as your content (for example the image). In that case the browser does the heavy work.

Module not found: Error: Can't resolve 'fs'

$
0
0

You have to go to folder \node_modules@angular-devkit\build-angular\src\angular-cli-files\models\webpack-configs\browser.js and replace node: false, by node: { crypto: true, stream: true, fs: “empty”, net: “empty”, tls: “empty” },
It’s working for me.

Ion-searchbar: pass filtered list results to another page

$
0
0

Never type the word any.

Obviously, that’s a slight exaggeration, but I do mean slight. Anywhere you can possibly give something a proper type, whether it be a controller property, a method argument, or a method return value, do so. It may seem tempting to just say “let’s just shut the compiler up for now” or “I’ll get around to it later”, but it even makes a huge difference when somebody else is reading your code for the first time, such as when you post questions here.

Naming conventions are also important, though less so. There are two problems with searchInter as an interface name: it needs to start with a capital letter, because classes and interfaces should be PascalCase - this way they don’t collide with variables and method names in camelCase. Also, Inter (or the Ixxx I often see from folks steeped in C#) isn’t useful. Since all the names of things I see here are so generic (search, item, result), I don’t know what you’re actually searching for. I’m going to pretend it’s books for now.

export class ResultsListPage {
  results: Book[] = [];
  constructor(private searchService: SearchService) {
    searchService.getResults().pipe(untilDestroyed(this))
      .subscribe(results => this.results = results);
  }
}

untilDestroyed comes from this project and is needed here to prevent leaking subscriptions. There are obviously other ways of doing this, such as keeping a Subscription property in the class or using the AsyncPipe, but untilDestroyed is my favorite.

How to run Ionic 3 and Ionic 4 environments on same machine without conflicts on macOS

$
0
0

Your question is really hard for me to understand because “Ionic” isn’t a monolithic thing. There’s the CLI, which builds stuff, and the framework, which is included in your distributed app. So can you rephrase your question without using any “Ionic X” version numbers, speaking more specifically about CLI and/or framework versions?

Ionic app just with outside page embebed

$
0
0

If by “publish it in the different markets” you mean “get it accepted by the Apple App Store”, then I would say “no”. Apple at least frowns mightily on “apps” that are just veneers over websites.

Technically, making such an “app” should be easy, but I’m not sure what the point would be.


Storage- Ionic2 RC

$
0
0

Why are you doing this? I can’t think of any situation where I would want localStorage involved in an Ionic app.

Push get Token

$
0
0

Can you describe more what specifically you’re struggling with? OP seems to have been generally unclear on the concept of asynchronous JavaScript.

How to access a particular value from json.i

$
0
0

I disagree, and urge you to revisit this decision. localStorage is never the right choice IMHO, because you have no guarantee when it will be wiped out from underneath you.

Additionally, if you did migrate to Ionic Storage, there would be no need whatsoever for the manual JSON stringification and parsing you are doing.

Inappbrowser get content stream from http response

How to build this interface with ionic is it possible? or do I need react js or native android?

$
0
0

Oh wow, I hadn’t looked at their stand-alone offering in a long time. That looks like a great solution. I’ve been trying to find a better charting solution for years. thanks!

Refresh page when the screen orientation is changed

$
0
0

Hello. I know this is old, but how do you unsubscribe?
It highlights error when you type this.screenOrientation.onChange().unsubscribe() saying "Property ‘unsubscribe’ does not exist on …"

Refresh page when the screen orientation is changed

$
0
0

I would use this nifty untilDestroyed Directive instead of doing this manually, but the answer to your question is that you need to save the result of your subscribe call:

subscription = this.screenOrientation.onChange().subscribe(() => {});
subscription.unsubscribe();

On Mac, Unable to install the oneSignal plugin on Ionic

$
0
0

Never run anything involving Ionic development with elevated privileges. It’s a needless security risk, it makes your system impossible for others to replicate, so your bugs will remain mysterious to everybody without your specific computer, and as you’ve discovered, CocoaPods are trying to save you from yourself. Let nvm manage your node installation instead.

Ionic 4 & Angular 9

$
0
0

Have you tried to update a v4 project ?

Ionic 3 and Google Play App Signing

$
0
0

I know I’m kind of late to the party on this, but I’m looking for steps on how to do this with an ionic app.

I think last fall to try the app bundle stuff I had uploaded our App signing certificate to Google thinking something would happen to our existing apps. I don’t think it did.

Now doing a brand new app, Google asked if I wanted to do App Signing by Google Play. I hit continue and tried to upload an APK signed. Didn’t work. Google knew I had signed it.

I have been trying to figure out what I really need to do.
I think I need to generate an upload key. Does has to be done in Android Studio? No command line?
Also on google play store under app signing I can download a certificate? Do I need this? What is this for?
How do the step for building/signing an apk from ionic change?
https://ionicframework.com/docs/v1/guide/publishing.html

Wondering if its just worth going back the old way?

Placeholder ion-input

$
0
0

Hi Brandy, I´d like to center the placeholder, but in a field that contains an icon:

<ion-item class="rounding" lines="none">
          <ion-input color="light" placeholder="E-mail"></ion-input>
          <ion-icon color="light" name="contact" slot="start"></ion-icon>
</ion-item>

Can you help me with that, please?

Sticky Footer in ion-content = different margin depending on the browser

Viewing all 228595 articles
Browse latest View live


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