I'd like to install places.js library into my Angular 7 project, but I have a problem. I've included following script into my 'index.html' file
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script>
var placesAutocomplete = places({
appId: 'myAppId',
apiKey: 'myApiKey',
container: document.querySelector('#addressInput')
});
</script>
but it is working only when I have
<input type="search" id="address-input" placeholder="Where are we going?" />
in my 'index.html'. I've tried to include this input into my component but it's not working and I have an error
[email protected]:1 Uncaught Error: Algolia Places: 'container' must point to an <input> element.
Is it possible to attach this script and make it working? In the documentation there is nothing about typescript. I've also tried to npm install and
import * from 'places.js'
but have same issue. Could someone help?