popover
popover copied to clipboard
Anchor Service is shared if used in a extended custom component
so for example i've created my own component by extending the popover class like this:
export class MyCustomComponentPopover extends SatPopover implements OnInit
but the anchoring service will conflict with the next instantiated custom popover if loaded in the same module. so if i load MyCustomComponentPopoverA & MyCustomComponentPopoverB in the same module the service will always pick MyCustomComponentPopoverB as the Popover which results in MyCustomComponentPopoverA opening MyCustomComponentPopoverB.
to fix this you'll need to provide the anchoring service anew but without using an existing anchoring service:
@Component({
selector: 'app-my-custom-component-popover-a',
providers: [{ provide: SatPopoverAnchoringService, useExisting: false }]
})
export class MyCustomComponentPopoverA extends SatPopover implements OnInit {}