我有Spring JSP返回元素的Map。第一种方法是使用JSTL
用选项填充select html元素。像这样:
<select name="environment" id="environment" name="environment_name" class="form-control" ng-model="environment" required>
<c:forEach var="environment" items="${environmentsMap}">
<c:if test="${environment!=null}">
<option value="${environment.key}"
<c:if test="${environment=='TEST'}"> selected="selected"</c:if>
>${environment.key}</option>
</c:if>
</c:forEach>
</select>
前端使用AngularJS。有没有办法将返回的Spring的模型属性绑定到Angular模型,这样我就可以使用Angular&#39; s ng-repeat
来填充select?