title: angularjs ui-sortable: cannot call methods on sortable prior to initialization; attempted to call method 'refresh'
body: <p>I'm trying to do sorting list, I take the element from the db but...</p>
  
  <blockquote>
    <p>Error: cannot call methods on sortable prior to initialization; attempted to call method 'refresh'</p>
  </blockquote>
  
  <p>My html:</p>
  
  <pre><code>&lt;div class="box-body" &gt;
      &lt;div ng:controller="menuConfigCtrl"&gt;
          &lt;ul ui-sortable ng-model="menu"  &gt;
              &lt;li ng:repeat="item in menu |filter:'all' | orderBy:'order':false" &gt;{{item.Title}}&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And my controller:</p>
  
  <pre><code>function menuConfigCtrl($location,$scope, menuFactory) {    
      $scope.menu = [];
      menuFactory.getMenu().success(function(data){
          $scope.menu = data;
      }); 
  }
  </code></pre>
  
  <p>My <code>getMenu()</code> is:</p>
  
  <pre><code>getMenu : function(){
      return $http({
          url: '/api/menuList',
          method: 'GET',
      });
  },
  </code></pre>
  
  <p>If I get the menu not from a rest service, but binding it, everything work without error!
  What can be?</p>
  
  <hr>
  
  <p><strong>Problem solved:</strong> I imported <code>angularjs.js</code> twice.</p>