admin 管理员组文章数量: 1086019
I'm trying to use the radio buttons implemented in UI Bootstrap firing a function by including a ng-click on the button. Apparently the radio button variable updates after the function has been called. I've created a Plunker to show this behaviour and explain the problem where the function fires an alert with the content of the variable.
Radio Buttons Plunker
Is there a simple way of solving this issue. Maybe by making the function to wait for the variable to update...
I'm trying to use the radio buttons implemented in UI Bootstrap firing a function by including a ng-click on the button. Apparently the radio button variable updates after the function has been called. I've created a Plunker to show this behaviour and explain the problem where the function fires an alert with the content of the variable.
Radio Buttons Plunker
Is there a simple way of solving this issue. Maybe by making the function to wait for the variable to update...
Share Improve this question asked Jun 25, 2014 at 0:26 prl900prl900 4,1794 gold badges35 silver badges42 bronze badges1 Answer
Reset to default 8Yep, simple fix. Use ng-change
instead of ng-click
on your radio buttons.
See http://plnkr.co/edit/0Jf4qrpHAXY8MeeVA3kl?p=preview
本文标签: javascriptClicking on Angular UI Bootstrap Radio ButtonsStack Overflow
版权声明:本文标题:javascript - Clicking on Angular UI Bootstrap Radio Buttons - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744097633a2533192.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论