我创建了一个网页,其中包含以下选项:
<select ng-model="access.method">
<option>DELETE</option>
<option>GET</option>
<option>POST</option>
<option>PUT</option>
</select>
然后检索:
$http({
method: access.method,
url: access.url
})
如何才能使网页打开时默认为GET选项?
答案 0 :(得分:0)
<select ng-init="access.method='POST'" ng-model="access.method">
<option>DELETE</option>
<option>GET</option>
<option>POST</option>
<option>PUT</option>
</select>