question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m having some trouble. I’d like my users to be able to use direct links.

My server supports SPA by redirecting everything that isn’t the root url to a 200.html page.

A direct link isn’t running the route to render.

I’ve sort of got around it by doing:

window.onload = () ->
  ref = "/" + (location.pathname + location.search).substr(1)
  router.updatePageLinks()
  if ref != window.loaded
    router.navigate(ref)

And each route updates what window.loaded should be.

This gets the right page to render. However, the URL doesn’t update.

Any thoughts?

Edit:

Minimal example here.

Click the link, click Test Link, and then click the title, and it works.

But, go here, and click the title, the page re-renders… But the url bar doesn’t update.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
krasimircommented, May 28, 2017

@flowen can you please try calling resolve once you finish with the routes definition (I mean the on calls).

0reactions
flowencommented, May 29, 2017

@krasimir ooohhh completely overlooked that. Thanks! fixed it for me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Direct Link - Global deliveries
Direct Link creates borderless e-commerce solutions for global delivery. We customize solutions that expand our clients' markets worldwide.
Read more >
DirectLink: Home
DirectLink Offers Local High-Speed Broadband Internet (Fiber, DSL) and Telephone (Phone, Voice) Service and much more in the Canby and Mt. Angel Oregon ......
Read more >
What's a direct link? - Widen Connect
Direct links can be selected when you share an asset from a portal. They are the URL from within the embed code that...
Read more >
DirectLinks
This extension circumvents certain techniques used by Google and Facebook to track link clicks. When you click a link in Google search ...
Read more >
Direct Links - University of Mary Washington
Our community of passionate, curious minds is one that turns values into vision and ideas into action. Find yourself here. You are here:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found