在下面的代码中,我在控制器中有一个名为“selectedDesignAreaId”的变量,我将此变量与“designarea.id”的当前值绑定,但是当我将“selectedDesignAreaId”更改为转发器类中的任何 designAreaId 值时未更新...始终设置“unSelectedCanvas”...
<div ng-repeat="designArea in productView.designAreas" style="position:absolute;left:{{designArea.x}}px ; top:{{designArea.y}}px;background-color: #ffdead"
ng-click="onDesignAreaClick(designArea.id)"
ng-class="{true: 'selectedCanvas', false:'unSelectedCanvas'}[(designArea.id == selectedDesignAreaId)]">