I have two components, that reference each other in some manner. Here is an simplified example.
@Component({
selector: 'a',
template: ` elements: <b /> `,
})
export class a {}
@Component({
selector: 'b',
template: `
@switch (type) {
@case (a) {
<a />
}
@case (c) {
<c />
}
}
`,
})
export class b {}
I get an NG303 (cyclic imports) error here. And I totally understand why.
But how can I solve such an issue?
- Normal patterns for resolving such things like implementing interfaces won’t work here, as it’s template code not typescript.
- Using Ivy Full build which would solve the issue is also no option.