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

Ng serve failing to compile in ionic 4

$
0
0

It contains lots of detailed error messages telling you exactly what problems exist on what lines of your code.


Can i call LifeCycle methods in Refresh function

$
0
0

It’s not a whole lot of an exaggeration to say that “giving you a way to elegantly not do this” is one of the major reasons libraries like RxJS and frameworks like Angular even exist in the first place.

You virtually never want setTimeout in an Ionic app. You definitely never want setTimeout with a magic number, if for no other reason than you can never know if you’ve chosen the right one.

Other things I see here that are fraught with peril, should only be done if you know exactly what you are doing and why, and should be extensively commented to explain why you are deviating from normal procedure: the == operator (always use === instead) and explicit comparison against true instead of using implicit truthiness.

Finally, this post suggests what I would do instead of involving lifecycle events here at all.

Help us test the Ionic 5 Release Candidate!

$
0
0

Just saw your youtube episode about RC 5 and did the switch on my app.
EVERYTHING WORKS!
(ok, one thing isnt but thats about it - ion refresher is blank white and not reacting at all)

But honestly this, I just have not expected.
I am working on my next version for outspoken.de app (instagram / spotify / facebook similar socialnetwork in the hardcore-punkrock niche), so it is not the smallest app feature wise and still you guys gave me no headache so far!

Thank you! For the video and much more for the smooth transition.

P.S any chance to find a working example of ion-refresher with ionic 5?

Ionic 4 pass data back from modal which is opened inside another modal to base page

$
0
0

While you wait for somebody to answer the specific question you asked, I’m going to try to convince you to design it away.

A modal means “sorry, user, I need you to take an urgent simple action before we can return to normal operation”. Firing off another modal from there goes beyond that. Here’s Apple’s UX advice on the topic.

[ERROR] An error occurred while running subprocess npm.

$
0
0

hi, i have a big problem with ionic. I cannot create a new project. when I type:
ionic start myApp tabs, I have this answer:
C:\Users\USER\Desktop\application>ionic start myApp tabs

Pick a framework!

Please select the JavaScript framework to use for your new app. To bypass this prompt next time, supply a value for the
–type option.

? Framework: Angular
? .\myApp exists. Overwrite? Yes
√ Preparing directory .\myApp - done!
√ Downloading and extracting tabs starter - done!

Installing dependencies may take several minutes.

──────────────────────────────────────────────────────────────

    Ionic Appflow, the mobile DevOps solution by Ionic

       Continuously build, deploy, and ship apps
    Focus on building apps while we automate the rest

    Learn more: https://ion.link/appflow

──────────────────────────────────────────────────────────────

npm.cmd i
npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Unexpected end of JSON input while parsing near ‘…9f6N3c/9VT8p7bmtZoJst’

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Roaming\npm-cache_logs\2020-01-30T19_06_55_632Z-debug.log
[ERROR] An error occurred while running subprocess npm.

    npm.cmd i exited with exit code 1.

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

How to conditionally set root page in Ionic 5

$
0
0

that is the wrong approach, firebase maintains the current user for you

Ion-card-content

$
0
0

You could look into using the CSS overflow: scroll property, but I must admit I suspect that once the dust settles, you are likely to decide that cards weren’t a very good fit for what you were really trying to do. Maybe you’ll have better results if you explain your interface goal and solicit suggestions about how to achieve it most naturally.

Help us test the Ionic 5 Release Candidate!

$
0
0

Thanks for the feedback! I’m happy to hear you had a smooth upgrade.

For the refresher - this may actually be a bug. It should be falling back to the browser refresher if the native refresher is not available. We just released a rc.2 about an hour ago with some fixes for refresher - https://github.com/ionic-team/ionic/releases/tag/v5.0.0-rc.2

Could you try that out and let me know if that fixes it for you? :slightly_smiling_face:


Display Image

$
0
0

I have tried what you suggest but I cannot display. Any suggestions ?

Ionic 4 ios build constuctor not calling in app and splash screen not hidding

$
0
0

Usually in situations like this, there is an error in the JavaScript console.

Ionic header bar with title image - image scaling

$
0
0

Ionic v4 and Angular 8 with Capacitor. I have a header bar with a title image that is working. Problem is I cannot get the image to scale to the header height automatically. Any help?

<ion-header>
  <ion-toolbar color="primary" mode="ios">
    <ion-title>
        <img src="../assets/icon/logo-header_sm.png" class="ion-header">
    </ion-title>
  </ion-toolbar>
</ion-header>
.ion-header{
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    height: auto;
}

Fcm Notification cannot appear when app is close/kill state

$
0
0

bump, same issue:

Ionic 4 app code:

this.fcm.onNotification().subscribe(data => {
        console.log(data);
        if (data.wasTapped) {
          setTimeout(() => {
            console.log('Received in background');
            this.router.navigate(['incoming-order']);
          }, 500);
        } else {
          console.log('Received in foreground');
          this.router.navigate(['incoming-order']);
        }
      });

    });

And the JSON format for sending the notification:

{
 "to" : "--device_key_here--",
 "collapse_key" : "type_a",
 "priority":"high",
 "notification" : {
     "body" : "Delivery for 2 parcels nearby",
     "title": "New Delivery Request",
     "click_action": "FCM_PLUGIN_ACTIVITY"
 },
 "data" : {
     "body" : "Delivery for 2 parcels nearby",
     "title": "New Delivery Request",
     "forceStart": "1"
 }
}

Please if anyone has come across similar issues? doesn’t seem to be device specific testing on 2 different devices.

FCM get data after Tap

$
0
0

I would suggest downloading postman (its free) and writing your own post request for testing.

You will need to:

  1. set the url to https://fcm.googleapis.com/fcm/send
  2. set the Autorization header of the request to key=<your_key_here> (you can get your key from the firebase console)
  3. Set the request to POST
  4. set the body of the request to bo something like this:

{
“to” : “device_token”,
“collapse_key” : “type_a”,
“priority”:“high”,
“notification” : {
“body” : “Body here”,
“title”: “a title here”,
}
}

Aot build, webpack missing module, cannot find module "."

$
0
0

Hi again,

Sorry for the late reply. I really don’t know the reason and I don’t remember where I found the solution, but I solve the problem downgrading typescript to 2.8.3 version.

I hope this can solve your issue too

Node-forge store rsa.keyPair

$
0
0

I’m experiencing the same issue, but it seems to be more about type than anything else. I was able to sign and verify after casting to an pki.rsa.PrivateKey. The line of code looks like:

const privateKey : pki.rsa.PrivateKey  = <pki.rsa.PrivateKey>pki.privateKeyFromPem(user_private_key);

Hopefully this helps someone else…


How to use Ionic Storage to display my page only once for first time users

$
0
0

Hi all,

I am currently seeking for help on how to use ionic storage to display my page only once for my first time users. I am familiar with using local storage :

    ngOnInit() {

    const checkView = localStorage.getItem('pageDisplayed');
    if (checkView) {
        // here redirect
    }
    localStorage.setItem('pageDisplayed', 'ok');

}

but I was told its not reliable. Hence, anybody can guide me on using ionic storage? Sample code will be helpful.

Thank you. Appreciate any help.

Ionic select CompareWith

$
0
0

TS:
declaration:
compareWith: (o1: any, o2: any) => boolean;

inside constructor:
this.compareWith = this.compareWithFn;

seperate function:
compareWithFn=(o1, o2) =>{
return o1 === o2;
};

Ionic cordova build android not creating apk file

$
0
0

Hi Rahul,
The same error I found for me ionic cordova build android and it stucks at vendor is.
I tried with your solution but it’s not working for me.
Any other solutions please let me know.
Thanks in advance.

Ionic select CompareWith

$
0
0

That’s two anys and two thises, so not what I was looking for.

Create single connection for entire application

$
0
0

Hi, I have two screens, First screen display Chats related to users, Second screen displays chat history of a particular person, So am using socket communication for fetching data. So I have created socket connection in the first component, am unable to use same socket in second component, how to solve please help me.

Viewing all 228507 articles
Browse latest View live


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