I know similar questions have been asked but they don't apply to my case. I have defined some variables in my controller and display their values in a panel. My controller related to the part is like this:
var vm = this;
vm.wellId = "id";
vm.wellSeq = "sequence";
vm.onWellSelected = onWellSelected;
...
function onWellSelected(wells) {
...
vm.wellId = wells[0]["id"];
vm.wellSeq = wells[0]["sequence"];
...
}
and my html component is like this:
<div plate id="plate-layout"
on-well-selected="vm.onWellSelected(wells)">
</div>
<ul class="list-group" style="width: 400px; overflow: auto">
<li class="list-group-item">{{vm.wellId}}</li>
<li class="list-group-item">{{vm.wellSeq}}</li>
</ul>
I checked the source and set break points in the function onWellSelected: vm.wellId and vm.wellSeq are indeed changed to the correct values after the operation, but the new value cannot be displayed. The definition of plate involves quite a number of other js files so not easy to show here, but plate itself is a directive, with support from two services. What could be the reasons? Thanks!