admin管理员组文章数量:1353174
Hi I have an AngularJS accordion that I've created with the code below. I would like to add a tab index to the accordion such that someone can tab through all the li tags of the accordion.
<accordion close-others="showOnlyOne">
<accordion-group heading="{{group.name}}" ng-repeat="group in reportFiltered" is-open="group.isThisOpen">
<ul class="nav">
<li ng-repeat="myObj in group.myObj">
<a ng-click="function(myObj.query)">{{myObj.name}}</a>
</li>
</ul>
</accordion-group>
</accordion>
I have tried doing things such:
tabIndex="item.index
but that doesn't seem to work.
Furthermore, I also need a way to access the tabs contents/value once they are currently tabbed on...but thats my next issue.
UPDATE:
I got the tabbing to work with {{$index}} but now I need to do something with the current li tag that is being tabbed over..
Hi I have an AngularJS accordion that I've created with the code below. I would like to add a tab index to the accordion such that someone can tab through all the li tags of the accordion.
<accordion close-others="showOnlyOne">
<accordion-group heading="{{group.name}}" ng-repeat="group in reportFiltered" is-open="group.isThisOpen">
<ul class="nav">
<li ng-repeat="myObj in group.myObj">
<a ng-click="function(myObj.query)">{{myObj.name}}</a>
</li>
</ul>
</accordion-group>
</accordion>
I have tried doing things such:
tabIndex="item.index
but that doesn't seem to work.
Furthermore, I also need a way to access the tabs contents/value once they are currently tabbed on...but thats my next issue.
UPDATE:
I got the tabbing to work with {{$index}} but now I need to do something with the current li tag that is being tabbed over..
Share Improve this question edited Jun 30, 2014 at 20:09 es3735746 asked Jun 30, 2014 at 18:51 es3735746es3735746 8514 gold badges17 silver badges40 bronze badges1 Answer
Reset to default 6Try
tabindex="{{item.index}}"
Or even better
ng-attr-tabindex="{{item.index}}"
You also can access $index from ngRepeat
本文标签: javascriptAdding a tab index to an AngularJS accordionStack Overflow
版权声明:本文标题:javascript - Adding a tab index to an AngularJS accordion? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743894321a2557504.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论