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

关于多个不同hash值是否有解决方法 #4

Open
ghost opened this issue Jun 30, 2017 · 3 comments
Open

关于多个不同hash值是否有解决方法 #4

ghost opened this issue Jun 30, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Jun 30, 2017

你好,
html页面删除default方法后,#/baidu提示Cannot read property 'controller' of undefined;
如何实现url获取hash(非定义path)执行mockController?
谢谢~!

@0x11-dev
Copy link
Owner

0x11-dev commented Jul 2, 2017

没看懂什么意思,能解释一下吗

@ghost
Copy link
Author

ghost commented Jul 2, 2017

demo里面use了'/'和'/page2'两个方法,我想实现的是,如果我有n个page共用一个方法,use应该怎么写?
var url = localhost.hash;
router.use(url,{...}).default('/').run //好像path参数不支持变量

@0x11-dev
Copy link
Owner

0x11-dev commented Jul 5, 2017

这里的路由表实际上是一个简单的hash table,你可以自己修改路由匹配逻辑支持正则

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

No branches or pull requests

1 participant