angular - Setting the width of an element to another element -


i have search bar , drop-down suggestions. dropdown have same width search bar search bars width dynamic depending on window size. how can set width of autocomplete dropdown dynamically updates width of search input?

i angular 2+ solution (i've seen couple based on jquery). seems basic question couldn't find solution online.

you can track current width of search bar using snippet answer:

https://stackoverflow.com/a/39084344/8490932

and inject extracted width style.width input of auto-complete dropdown.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -