Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48978

In IonButton, is href compatible with onClick()?

$
0
0

The below onClick() function works as intended without href. When I add in the href, only the href seems to run, not the onClick() function. How do I both run the onClick() function and also send the user to a new page?

                        <IonButton
                            color="primary"
                            onClick={() => {saveData()}}
                            href="/create/"
                        >Save</IonButton>

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles