Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hope helps with #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Hope helps with #326

wants to merge 1 commit into from

Conversation

EAzari
Copy link
Contributor

@EAzari EAzari commented Mar 29, 2023

No description provided.

@krasimir
Copy link
Owner

Hey, thank you for the PR but can you provide some more description what exactly you are changing and why.

@EAzari
Copy link
Contributor Author

EAzari commented Mar 30, 2023

I changed getCurrentEnvURL to getCurrentURLPath and applied that change in all codebase

@MrOtek598
Copy link

MrOtek598 commented Jun 24, 2023

Hi,

Thanks for your work, I love Navigo ! I use it in many projects.

I know this is'nt the place for asking you this, but sorry I don't know where else I can reach to you.
I can't find in the documentation how I can get the clicked element with Navigo. Is there a way ? It certainly has to be, sorry I don't have your skills to understand everything you did.

For now, when I want to have the clicked element I used to do this :

function getClicked(element){
   console.log(element)
}
<a href="/" data-navigo onclick="getClicked(this)">Hey!</a>

But it's too heavy because every link has to have this function.

I'm looking for something like this :

const router = new Navigo("/")
router.on("/", (match, event) => {
    console.log(event.target)
})

Can you please help me ?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants