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

如何实现依赖性models的初始化 #1023

Closed
zhangqianliang opened this issue Sep 6, 2018 · 5 comments
Closed

如何实现依赖性models的初始化 #1023

zhangqianliang opened this issue Sep 6, 2018 · 5 comments

Comments

@zhangqianliang
Copy link

现在有一个需求:
全局layouts的models app.js请求加载一些服务的配置信息。然后在其他children页面依赖models app.js的配置信息来请求具体的数据。请问这中依赖其他model数据的需求如何实现?谢谢。🙏。

现在直接在a页面的model层select app 的数据都是空的。设置延时的话,太不友好了。谢谢。🙏。

@xiaohuoni
Copy link
Member

可以增加一个loading路由。判断请求服务器数据完成,之后再进入页面。

@sorrycc sorrycc closed this as completed Sep 9, 2018
@zhangqianliang
Copy link
Author

@xiaohuoni 有这方面的文档吗?谢谢。

@xiaohuoni
Copy link
Member

xiaohuoni commented Sep 12, 2018

@zhangqianliang 感觉我的方案也是临时性的。也有类似这个问题:‘设置延时的话,太不友好了’

@xiaohuoni
Copy link
Member

@sorrycc 老大再看一眼吧!嘻嘻嘻

@xiaohuoni xiaohuoni reopened this Sep 12, 2018
@sorrycc
Copy link
Member

sorrycc commented Sep 17, 2018

#1051 跟进,我觉得 #1051 应该能解决这个问题。

@sorrycc sorrycc closed this as completed Sep 17, 2018
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

3 participants