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

angular作为子应用,router跳转问题 #1417

Open
hehanli101 opened this issue Oct 17, 2024 · 1 comment
Open

angular作为子应用,router跳转问题 #1417

hehanli101 opened this issue Oct 17, 2024 · 1 comment

Comments

@hehanli101
Copy link

hehanli101 commented Oct 17, 2024

问题描述

  1. 使用官方的示例,main-vue2
  2. 增加两个按钮,在基座点击按钮通过microApp.route进行跳转,发现控制台报错,无法跳转

复现步骤

在main-vue2工程里面,子应用alurlar14页面增加以下代码, 模版里面增加
<button @click="goTo('/material')">material</button> <button @click="goTo('/page3')">page3</button>
goTo(url) {
microApp.router.push({name: 'angular14', path: /angular14${url}})
}

上传截图

image

复现仓库

官方提供的示例可可先 main-vue2

环境信息

  • micro-app版本:1.0.0-rc.13
  • 主应用前端框架&版本:vue2
  • 子应用前端框架&版本:angular14
  • 构建工具&版本:
@Paul-Yellow
Copy link

把zone.js 放在主应用的main.js 中或者 子应用用iframe模式

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