Skip to content

Commit 3bb9bee

Browse files
authored
fix: 修复 Angular 组件内部无法使用外部服务的问题 (antvis#4267)
1 parent a87fb3b commit 3bb9bee

File tree

1 file changed

+3
-1
lines changed
  • packages/x6-angular-shape/src

1 file changed

+3
-1
lines changed

packages/x6-angular-shape/src/view.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export class AngularShapeView extends NodeView<AngularShape> {
6161
this.setInstanceInput(content, embeddedViewRef),
6262
)
6363
} else {
64-
const componentRef = viewContainerRef.createComponent(content)
64+
const componentRef = viewContainerRef.createComponent(content, {
65+
injector,
66+
})
6567
const insertNode = (componentRef.hostView as EmbeddedViewRef<any>)
6668
.rootNodes[0] as HTMLElement
6769
container.appendChild(insertNode)

0 commit comments

Comments
 (0)