【发布时间】:2017-08-03 14:11:43
【问题描述】:
我对 angularjs 非常陌生,并且已将常规 html <select> 框替换为 Angular 模态选择框。
选择框填充了 $http ajax 请求并加载数据正常,但表单提交失败。
我的原始代码:
<body>
<form id="form-filename">
<div align="center"><select name="filename" id="filename" class="browser-default"></select></div>
<input type="button" id="submit-filename" value="Apply"><br>
</form></body>
我的带有角度选择框的版本:
<body ng-app="httptest" ng-controller="getjson">
<form id="form-filename">
<button class="semi-transparent-button" name="filename" modal-select="" ng-model="someModel" options="data" modal-title="Select Location"> Select File
<div class="option">
{{option}}
</div></form>
我不确定需要修改什么才能让选择框提交表单并更新文件名值。
【问题讨论】:
-
在您的情况下“失败”是什么意思?
标签: javascript jquery html angularjs forms