I need the text value of an input type="number" field because I need to scale other elements depending on its size.
const numberInput = document.getElementById('numberInput');
const outputSpan = document.getElementById('output');
numberInput.addEventListener('input', (inputEvent) => {
outputSpan.innerText = inputEvent.target.value;
});
Does not work for inputs like ["e", "-", "+", "+132", "123e123123"] I know that in the background the input is transformed into the corresponding number but i need the original string for my resizing/positioning.
For clearity a link to a Stackblitz example:
For any help i would be grateful.
[Edit] Updated the angular example, so now it should be clear what the problem is.