How to force data update with bindonce directive?


#1

Hello,

I have some list with data that uses bindonce directive.

The list of items looks like:

 <div class="row">
        <p bo-text="group.title">
        </p>
    </div>

the working example is:

 <div class="row">
        <p>{{group.title}}
        </p>
    </div>

However I want to use 1st example with bo-text and update my title. For example I got from device new title.

I simulated the update:

      $timeout(function() {
           groups[0].title = "hey"; // update title for 1st item               
           $scope.visible_groups = groups;
      },3000);

Actually, nothing happened.

How to make it work?

Thank you


#2

Right now I workaround:

$timeout(function() {
            $scope.visible_groups = []; // remove all groups

            groups[0].title = "hey"; // set new title

            $timeout(function() {
                $scope.visible_groups = groups; // with low priority recreate groups
            }, 0);
        }, 3000);

This example works but I get some blinking.


#3

Any new solution about this?