siriwave
siriwave copied to clipboard
Integrated in angular/typescript
hey sir, thank you for the beatiful animation. I would like to add it to my chatbot written in Angular. I added this code to ngOnInit(): this.siriWave = new SiriWave({ container: document.querySelector("#myWave"), cover: true, height: 100, style: "ios9" });
But somehow i am getting the error: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. Can you please help me out ?
Hello! Does the element document.querySelector("#myWave")
exists in the DOM?
@tungUAS verify you did not place container inside an *ngIf block and replace it with a [hidden] in that cause. I was having the same issue and that solved it for me. Give it a try.