I try to get an element by his href and add a class to this element in typescript, For this I tried :
let path = window.location.pathname;
let link = document.querySelectorAll("a[href="+path+"]");
console.log(link);
But my console.log throw me an error
querySelectorAll' on 'Document' is not a valid selector
Do you know how could I fix this ? Thanks