<input id="width" name="width" style="width:100px" value="550" type="text" ng-model="width">
How would I get the value from above to write into the $scope under $scope.user.width ?
Whilst keeping the initial value="500"
Initialise the value in your controller:
$scope.user = {width : 500};
<input id="width" name="width" type="text" ng-model="user.width">
$scope.user.width would update with the value when the input field value has changed?ngModel directive.$scope.user.width or $scope.user = {width: ''}; need to be set in order for <input id="width" name="width" type="text" ng-model="user.width"> to store the values?