2

Need to dynamically change the width of the input, and so that the suffix meters (m) was always near the number that I enter. Also need to passing some value to input via value = "something" then the width of the input need to be expanded depending on the transmitted value.

https://stackblitz.com/edit/angular-af5yt7?file=src/app/app.component.html

1 Answer 1

1

It would be best to create a directive to update the width, but why build this yourself? No need to reinvent the wheel, use some existing package like: https://www.npmjs.com/package/ngx-autosize-input

Sign up to request clarification or add additional context in comments.

2 Comments

this package is not working for me because a have angular 8, and this package for 10+
you can install a previous version: npmjs.com/package/ngx-autosize-input/v/2.3.7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.