Skip to content

Commit

Permalink
fix: 修复 Angular 组件内部无法使用外部服务的问题 (#4267)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eve-Sama authored Apr 28, 2024
1 parent a87fb3b commit 3bb9bee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/x6-angular-shape/src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export class AngularShapeView extends NodeView<AngularShape> {
this.setInstanceInput(content, embeddedViewRef),
)
} else {
const componentRef = viewContainerRef.createComponent(content)
const componentRef = viewContainerRef.createComponent(content, {
injector,
})
const insertNode = (componentRef.hostView as EmbeddedViewRef<any>)
.rootNodes[0] as HTMLElement
container.appendChild(insertNode)
Expand Down

0 comments on commit 3bb9bee

Please sign in to comment.