I am trying to submit the auto selected or user selected value. While submitting the form, input elements are returning value as undefined.
I have tried binding the values in multiple ways as suggested on different sites but nothing helped.
HTML code
<div ng-switch-when="textinput" class="form-group">
<label class="control-label col-xs-3" for="textInput"><b>:</b></label>
<div class="col-xs-9">
<input type="text" class="form-control" id="textInput" pattern="tag.validation" ng-required="tag.required" ng-readonly="!tag.editable" ng-model="inputText" ng-init="inputText=tag.autofill" />
</div>
</div
JS code
$scope.submitForm = function() {
$scope.formMain = true;
$scope.footerMessage = false;
$scope.getError="";
$scope.error="";
alert($scope.textBox);
};
Please help on this. Link to Plunkr
Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire