0

HTML page:

<div class="myClass">
    <h2>Test</h2>
     <sort users="users" id="test"><sort>
</div>

AngularJS Directive:

    angular.module('myModule').directive('sort', function() {
  return {
    scope: {
      users: '='
    },
    template: '<ul><li ng-repeat="item in users"><h3>{{item.name}}</h3></li></ul>',
    link: function (scope, element) {
      scope.$watch('users', function(newValue, oldValue){
        if (newValue!== oldValue) {
        }
      }, true);
      $(element).sortable({
         connectWith: "ul",
         items: 'li',
         start: function(event, ui) {
         },
         stop: function(event, ui) {
             $(element).sortable('refresh');
           scope.$applyAsync();
         }
      });
      }
    }
});

And question is how to refresh (jQueryUI) my tab and angular can see this changes without using UI.Sortable ? Because in my way AngularJS doesn't see any changes in tab.

Drylozav
  • 183
  • 1
  • 9
  • Might want to checkout [this](http://stackoverflow.com/questions/16703215/how-to-reload-or-re-render-the-entire-page-using-angularjs) – Blkc Jul 04 '15 at 15:16
  • Can y write more details ? – Drylozav Jul 04 '15 at 15:22
  • Did you checkout on the link I put there? If you did it basically is the same question asking how to refresh the tabs. Anyways another way you can do a reload will be doing a `$window.location.reload()` with JQuery; – Blkc Jul 04 '15 at 15:37
  • I need to refresh only tab, but no whole page. – Drylozav Jul 04 '15 at 16:01
  • Try .load(); eg. `var href = "/alert/index/"; $("#your-tab-id").load(href);` or use the .tabs(); method in JQuery. – Blkc Jul 04 '15 at 16:05

0 Answers0