Twitter bootstrap 显示从AngularJS到Twitter引导Popover的动态数据
我试图让Bootstrap Popover在AngularJS和AngularUI传递中使用动态绑定数据。在我的小提琴中,我无法动态显示办公室位置的标题和每个办公室中的人员列表:一种方法是在Twitter bootstrap 显示从AngularJS到Twitter引导Popover的动态数据,twitter-bootstrap,angularjs,popover,Twitter Bootstrap,Angularjs,Popover,我试图让Bootstrap Popover在AngularJS和AngularUI传递中使用动态绑定数据。在我的小提琴中,我无法动态显示办公室位置的标题和每个办公室中的人员列表:一种方法是在ui选项中引用office,如: 此控制器代码: $scope.offices = [ {location:'Europe', people:['andy','gloopy']}, {location:'USA', people:['shaun','teri']}, {location
ui选项中引用office
,如:
此控制器代码:
$scope.offices = [
{location:'Europe', people:['andy','gloopy']},
{location:'USA', people:['shaun','teri']},
{location:'Asia', people:['ryu','bison']}];
$scope.popoverOptions = function(office){
return { title: office.location,
content: office.people.join(',') };
}
我们这里很少有引导组件:也许你可以用它作为你的popover的灵感
<div ng-repeat="office in offices">
<a href="" ui-jq="popover" ui-options="popoverOptions(office)">Test Popover - {{office.location}}</a>
</div>
$scope.offices = [
{location:'Europe', people:['andy','gloopy']},
{location:'USA', people:['shaun','teri']},
{location:'Asia', people:['ryu','bison']}];
$scope.popoverOptions = function(office){
return { title: office.location,
content: office.people.join(',') };
}