In my HTML view, I have an ng-template which contains a form. I am trying to submit form data using ng-submit, but when I click on the submit button, nothing happens. However, other data bindings are working fine with text fields in the form, using ng-model in my controller. Below is the HTML code snippet:
<script type="text/ng-template" id="updatetemplate">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Update</h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<form name="update_form" ng-submit="updateUser(ngDialogData.id, ngDialogData.currentname, ngDialogData.currentroleid)">
<div class="box-body">
<div class="form-group">
<input type="hidden" name="userid" ng-model="ngDialogData.id" class="form-control">
<label>Name</label>
<input type="text" class="form-control" name="name" ng-model="ngDialogData.currentname" placeholder="Enter name">
<p></p>
<label>User role</label>
<input type="text" class="form-control" name="roleid" ng-model="ngDialogData.currentroleid" placeholder="Enter name">
</select>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer">
<button type="submit" class="btn btn-primary" name="updatebutton">Update</button>
</div>
</form>
</div>
<!-- /.box -->
</script>