react f7怎么直接进入localhost:3007/about页面(而不是进入home页面)

劍唔风
  • 151

老外很忙~没人回我

http://forum.framework7.io/t/...

跑这儿问一个:react f7怎么使浏览器地址栏url和当前route同步更新,我看了这个react的template,他的所有route在被访问的时候,地址栏url是不变的。谢谢老铁们

As stated above, the route's path property means the path/url that will be displayed in browser window address bar (if pushState enabled) when the following route will be loaded either by api or clicking on a link with same path.

<Button onClick={()=>{props.f7router.navigate('/memoDetail/', { pushState: true, history: true })}} ></Button>

{

path: '/course',
pushState: true,
history: true,
component: CoursePage,

}

都不行,地址栏就是不变。。。

回复
阅读 1.5k
1 个回答

view 加上pushState就好。
If you develop web app (not PhoneGap or Home Screen web app) it is useful to enable hash navigation (browser url will look like "http://my-webapp.com/#!/about.html"). User as well will be able to navigate through app's history by using browser's default back and forward buttons.

宣传栏