I try to draw a line with leadr-line(https://www.npmjs.com/package/leader-line) between two dots, but the line is diplayed in the background instead of component view
import {DOCUMENT} from '@angular/common';
import 'leader-line/leader-line.min';
declare const LeaderLine: any;
@Component({
selector: 'app-component1',
})
export class Component1 implements OnInit{
constructor(@Inject(DOCUMENT) private document) {
}
createLine(){
const line = new LeaderLine(
this.document.getElementById('remainder'),
this.document.getElementById('button0')
)
}
}
this component is used in another component
@Component({
selector: 'app-component2',
})
export class Component2 implements OnInit {
constructor() { }
ngOnInit() {
}
<tab>
<app-component1>
</app-component1>
</tab>