title: Angular ui-tree and accept callback for restricting nodes?
body: <p>I'm using : <a href="https://github.com/angular-ui-tree/angular-ui-tree" rel="noreferrer">https://github.com/angular-ui-tree/angular-ui-tree</a></p>
  
  <p>I want to accept:</p>
  
  <ol>
  <li>Categories to root scope of ui-tree</li>
  <li>apps to the apps of same categories.</li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/JwI8V.png" alt="enter image description here"></p>
  
  <p>My controller is (partial):</p>
  
  <pre><code>//Accept Categories at root scope and accept apps only inside same category
  
  $scope.options = {
  
      accept: function(sourceNodeScope, destNodesScope, destIndex) {
          //todo check nodes and return
          alert('called');
          $log.debug("sourceNodeScope");
          $log.debug(sourceNodeScope);
          $log.debug("destNodesScope");
          $log.debug(destNodesScope);
          return false;
      },
      dropped: function(event) {
  
      },
      beforeDrop: function(event) {
  
      }
  
  };
  </code></pre>
  
  <p>My HTML is:</p>
  
  <pre><code>    &lt;div ng-controller="CpoTreeViewCtrl"&gt;
  
      &lt;div&gt;
  
  &lt;script type="text/ng-template" id="apps_renderer.html"&gt;
    &lt;div ui-tree-handle&gt;
      {{app.name}}
    &lt;/div&gt;
  &lt;/script&gt;
  
  &lt;script type="text/ng-template" id="category_renderer.html"&gt;
    &lt;div ui-tree-handle &gt;
      {{category.name}}
    &lt;/div&gt;
    &lt;ol ui-tree-nodes ng-model="category.apps"&gt;
      &lt;li ng-repeat="app in category.apps" ui-tree-node ng-include="'apps_renderer.html'"&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/script&gt;
  
  &lt;div ui-tree="options"&gt;
    &lt;ol ui-tree-nodes ng-model="treeData" id="tree-root"&gt;
      &lt;li ng-repeat="category in treeData" ui-tree-node ng-include="'category_renderer.html'"&gt;&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to accept:</p>
  
  <ol>
  <li>Categories to root scope of ui-tree</li>
  <li>apps to the apps of same categories.</li>
  </ol>
  
  <p>The accept callback is not getting fired. What's not right here?</p>
  
  <p>Thanks!</p>