Angular17使用setData出现弃用提示 Angular: Replacing the `context` object of an `EmbeddedViewRef` is deprecated.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
问题描述
Angular17之后,直接替换context会提示弃用,应该直接修改context属性而不是替换整个context
重现链接
无
重现步骤
在Angular17及以上的Angular应用中引入@antv/x6-angular-shape后,注册templateRef,使用setData修改ngArguments
预期行为
正常使用,不出现提示
平台
- 操作系统: Window
- 网页浏览器: Microsoft Edge
- X6 版本: 2.18.1
- x6-angular-shape版本: 2.0.2
屏幕截图或视频(可选)
补充说明(可选)
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the x6-angular-shape implementation used when a templateRef is registered and setData updates ngArguments. Reproduce the deprecated EmbeddedViewRef context warning in an Angular 17 application, then verify that updating data no longer emits the warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100