Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 显示从AngularJS到Twitter引导Popover的动态数据_Twitter Bootstrap_Angularjs_Popover - Fatal编程技术网

Twitter bootstrap 显示从AngularJS到Twitter引导Popover的动态数据

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

我试图让Bootstrap Popover在AngularJS和AngularUI传递中使用动态绑定数据。在我的小提琴中,我无法动态显示办公室位置的标题和每个办公室中的人员列表:

一种方法是在
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(',') };
}