【发布时间】:2016-01-06 04:50:14
【问题描述】:
我有这部分代码可以创建一个按钮组:
<div class="btn-group btn-group-lg">
<button id = "Image" type="button" class="btn btn-primary">Click1</button>
<button id = "Text" type="button" class="btn btn-primary">Click2</button>
</div>
我想让它动态化,从某种意义上说,每个按钮都会将我带到不同的 URL。我遇到了这个帖子:
How do I navigate to another page on button click with Twitter Bootstrap?
但是,在处理按钮组时我不能使用<a></a>(或者至少想不出这样做的方法)。所以我想我需要一个带有函数的 JS 文件?我如何使用 AngularJS 做到这一点?
【问题讨论】:
标签: javascript html angularjs twitter-bootstrap