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

可以指定默认子应用启动吗 #108

Closed
sxhieen opened this issue Jun 17, 2020 · 8 comments
Closed

可以指定默认子应用启动吗 #108

sxhieen opened this issue Jun 17, 2020 · 8 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@sxhieen
Copy link

sxhieen commented Jun 17, 2020

打开时默认重定向到指定子应用,子应用display: none,没有显示出来

@why520crazy
Copy link
Member

打开时默认重定向到指定子应用,子应用display: none,没有显示出来

你是怎么重定向的,只要路由匹配到子应用的路由就会展示的

@why520crazy
Copy link
Member

初始化在Portal中路由跳转到子应用路由即可。

@why520crazy why520crazy added the question Further information is requested label Jun 18, 2020
@sxhieen
Copy link
Author

sxhieen commented Jun 18, 2020

打开时默认重定向到指定子应用,子应用display: none,没有显示出来

你是怎么重定向的,只要路由匹配到子应用的路由就会展示的

path: '',
redirectTo: 'xxx',
pathMatch: 'full'

我是在app-routing.module里这样设置的

@why520crazy
Copy link
Member

那你看看xxx是不是子应用的路由,有没有匹配到子应用

@sxhieen
Copy link
Author

sxhieen commented Jul 2, 2020

那你看看xxx是不是子应用的路由,有没有匹配到子应用

应该是有匹配到的,因为一刷新就显示出来了,只是首次打开重定向的话,就display: none,dom都在

@why520crazy
Copy link
Member

那你看看xxx是不是子应用的路由,有没有匹配到子应用

应该是有匹配到的,因为一刷新就显示出来了,只是首次打开重定向的话,就display: none,dom都在

这的确是一个缺陷,我会尽快修复,在没有修复之前,你可以使用一个组件,然后调用 navigateByUrl(url, { replaceUrl: true }) 代替 redirectTo

@sxhieen
Copy link
Author

sxhieen commented Jul 3, 2020

那你看看xxx是不是子应用的路由,有没有匹配到子应用

应该是有匹配到的,因为一刷新就显示出来了,只是首次打开重定向的话,就display: none,dom都在

这的确是一个缺陷,我会尽快修复,在没有修复之前,你可以使用一个组件,然后调用 navigateByUrl(url, { replaceUrl: true }) 代替 redirectTo

谢谢~😊

@why520crazy
Copy link
Member

please bump @worktile/planet to 1.1.3

@why520crazy why520crazy self-assigned this Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants