I’m using Angular 8/Algolia 3.35.1.
I want to get the value of the searchbox field - what I’ve typed in - before leaving the search page. I found an example at:
input value is null at
const input = document.querySelector('#searchBox');
#searchBox ID correct, or was that just an example?
When using the browser debugger, and inspecting
input.ais-SearchBox-input I’m seeing an empty id, where I’d expect to see
I’m in the
ngOnDestroy() function when trying to get the
input value, because I want the value before I leave the search page.