Is there a way to dynamically set the size of the input
tag in my HTML based on the length of the ng-model value?
I attempted this approach:
<span>Node Path:
<input for="nodeName" type="text" ng-model="nodePath" size="{{nodePath.length()}}"ng-disabled="true">
</span>
However, I encountered an error:
Error: [$interpolate:interr] Can't interpolate: {{nodePath.length()}}
TypeError: v2.length is not a function
Any suggestions on how to make this work successfully?