-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
定义新的model后,路由切换时报app.model: namespace should be unique #22
Comments
遇到一样的问题 |
依次檢查:
|
检查了这两项,都没有问题。 |
不會啊,第一次跳轉到該路由時,僅加載一次該組件的js,此時是第一次require該組件的model,整個項目衹會require一次model/markets |
我刚下载了这个分支上的代码,不加任何改动就会报错。 |
出现同样问题了 |
@taven-liu能看一下你的新增代码吗 |
|
github上的代码就不行了,切换2次就报那个错了,不用添加新的
… 在 2017年1月10日,下午2:41,taven-liu ***@***.***> 写道:
{ path: 't1', name: 't1', getComponent (nextState, cb) { require.ensure([], require => { app.model(require('./modules/aTest/models/t1')) cb(null, {component: require('./modules/aTest/containers/t1Container')}) }) } },
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#22 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGKItu68p0EDPws319ilgFRIqfyOtFaqks5rQyg1gaJpZM4LbevV>.
|
可能是dva版本的原因,暂时先把dva 切换到 1.1 版本吧,后面我解决一下 |
已解决 ff2005d |
dvajs/dva#533 官方针对1.2的解决办法,最好还是搞下吧,要不升级到1.2后还会有问题 |
@xiaosansiji ,现在升级没问题了啊,ff2005d |
定义新的model后,路由切换时报错 app.model: namespace should be unique
model:

路由配置:

报错截图:

The text was updated successfully, but these errors were encountered: