如何调试和修复不兼容的AngularJS组件?

时间:2014-12-15 19:34:31

标签: angularjs treeview angular-ui-bootstrap

我在angular.tree使用UI Bootstrap和手风琴。当树放在手风琴外面时,树会正确地接收事件,但放在手风琴中时则不会。

在这里演示:Plunker

<p>Accordion:  Click "Tree in accordion" below to show tree</p>

<div ng-controller="TestController">
    <accordion close-others="true">
        <accordion-group heading="Tree in accordion">
          <ul ng-tree="model" multiple>
              <!-- PROBLEM:  doSelected() is not called -->
              <li select="doSelected()">{{item.name}}</li>
          </ul>
        </accordion-group>
        <accordion-group heading="Other">
          <h1>Other</h1>
        </accordion-group>
    </accordion>

<hr>

<p>Another tree</p>
          <ul ng-tree="model2" multiple>
              <!-- doSelected2() is correctly called, see alert output -->
              <li select="doSelected2()">{{item.name}}</li>
          </ul>
</div>

0 个答案:

没有答案