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.

[v2] Router go back problem when define 404 route

See original GitHub issue

This is a (multiple allowed):

framework7

What you did

When i open view pushState and define the 404 page in routes array, go to page 2 and go to page3, then back page 2 and back to home page. When page 2 back to home page, the page show 404 page, not go to home page.

var app = new Framework7({
  root: '#app',
  name: 'My App',
  id: 'com.myapp.test',
  theme: 'ios',
  routes: [
    {
      path: '/',
      url: 'page1.html',
    },
    {
      path: '/page2/',
      url: 'page2.html',
    },
    {
      path: '/page3/',
      url: 'page3.html',
    },
    {
      path: '(.*)',
      url: '404.html',
    }
  ],
  view: {
    pushState: true
  }
});

Expected Behavior

Go to the home page.

Actual Behavior

Go to the 404 page.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
yinzhijun-cncommented, Jan 25, 2019

I found a solution

view:{ stackPages:true }

image

1reaction
nolimits4webcommented, Mar 10, 2018

Push state configured not correctly. According to your example, pushStateRoot parameter must be set to /frontend/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue Router return 404 when revisit to the url - Stack Overflow
And it work fine when I visit to vue routing via v-href or href. But, when I try to refresh that page or...
Read more >
Handling 404 Routes in React with a Not Found component
In this post you'll learn how to handle 404 routes in React Router and provide a fallback component for displaying an imfamous 404...
Read more >
7.1 Fix Cannot Get/URL on Refresh | React Reach Router
Handing 404 Pages | Fix Cannot Get/URL on Page Refresh | Error | React Router | Reach Router | Handing 404 Pages |...
Read more >
Angular Router: Child Routes, Auxiliary Routes, Master Detail
In this post, we are going to do a guided tour of the main routing configuration concepts needed to use the Angular Router...
Read more >
React Router DOM: How to handle routing in web apps
A router allows your application to navigate between different components, ... It allows you define routes in the same declarative style:
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