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

render是否可以考虑前置逻辑? #19

Open
wodenwang opened this issue Jun 22, 2016 · 3 comments
Open

render是否可以考虑前置逻辑? #19

wodenwang opened this issue Jun 22, 2016 · 3 comments

Comments

@wodenwang
Copy link

比如在render里面,如果return null,就不做内容替换,保留原有的内容.

我们目前的项目遇到一个情况,从home页跳转到page1页面,在page1的render里面执行一些ajax的校验逻辑.假如校验逻辑不通过,我希望保持home的内容不变.

@progrape
Copy link
Owner

这个可以有~

@wodenwang
Copy link
Author

棒棒哒期待一下更新

@progrape
Copy link
Owner

progrape commented Jul 1, 2016

@wodenwang 这里尝试加这个功能的时候,发现另一个问题。从 home 页面跳到 page1 页面,如果 page1 的 render 返回内容为空,还是保留 home 的内容,但是 url 中的 hash 已经变成 page1了,历史记录中也记录了 page1。如果此时从 home 点击到 page2,再返回的话,会回到 page1。这不是期望的

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

2 participants