如何从选择模型中传递一个值,该模型是使用模型中Symfony框架的form.widget创建的,该模型是使用指令定义的?
模板代码:
<select name="post[vote][cinema]" ng-model="cinema" ng-change="set(cinema)">
<rating ng-model="cinema" max="max"></rating>
Html代码:
<select name="post[vote][cinema]" ng-model="cinema" ng-change="set(cinema)">
<p class="dash ng-isolate-scope ng-valid ng-dirty"
ng-mouseleave="reset()" tabindex="0" role="slider"
aria-valuemin="0" aria-valuemax="10" aria-valuenow="4" ng-model="cinema" max="max">
<a ng-repeat="r in range track by $index"
ng-mouseenter="enter($index + 1)"
ng-click="rate($index + 1)" ng-class="{...}" class="ng-scope"></a>
问题在于,如果通过select元素选择评级值,则仅为最后一个元素正确分配。并且预计特定选择将与相同模型的元素交互。