如何在html5mode中使angular-ui bootstrap手风琴组工作

时间:2013-04-23 20:31:45

标签: angularjs angular-ui angularjs-routing

如果我在配置模块中启用html5mode为true,则打开accordion-group的“超链接”会将网址重新路由回基本网址。手风琴组不仅没有打开,而且你被重新安排。当html5mode未启用时,我的手风琴组工作正常。

是否有一个简单的解决方案,或者我将不得不深入到angularjs-ui源?或者我只是运气不好html5mode? 我的手风琴代码非常简单:

<accordion close-others='true'>
<accordion-group ng-repeat='trip in retrieved.iss' heading='ISS:  {{trip.date}}'>
    <p class='deleteItem' ng-click='deleteItem(trip.uniqueCount)'>X</p>
    <p><span class='btn-group ' data-toggle='buttons-checkbox'>
        <button type='button' class='btn btn-primary small-btn' ng-model='individualRadioModel' btn-radio="'Mine'">Mine</button>
        <button type='button' class='btn btn-primary small-btn' ng-model='individualRadioModel' btn-radio="'All'">All</button>
        </span></p>
    <p ng-repeat='student in trip.studentList | matchStudents:individualRadioModel'>{{student}}</p>
</accordion-group>

1 个答案:

答案 0 :(得分:0)

答案是不要使用较旧版本的Angularjs。问题出在1.0.4。移至1.0.6或更高版本,问题就消失了。

不要像我这样古老的模糊。更新你的图书馆,孩子们。