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

expose contexts #85

Closed
wants to merge 1 commit into from
Closed

expose contexts #85

wants to merge 1 commit into from

Conversation

c19
Copy link

@c19 c19 commented Oct 23, 2019

So that other component can act on route changes

So that other component can act on route changes
@JohnnyFun
Copy link

As a workaround, you can import it directly from node_modules like kysonic points out here: #41

import {getContext} from 'svelte';
import {ROUTER} from 'svelte-routing/src/contexts';
const { activeRoute } = getContext(ROUTER);

$: {
    console.log($activeRoute)
 }

@krishnaTORQUE
Copy link
Collaborator

Hi
I forked svelte-routing > https://github.com/krishnaTORQUE/svelte-routing-next.
And I merged your PR there.
Please let me know if you have any query.
Thanks.

@krishnaTORQUE
Copy link
Collaborator

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