大佬教程收集整理的这篇文章主要介绍了Bootstrap popover在AngularJs ng-repeat中不起作用,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<body ng-app="app" ng-controller="my_controller"> <div class="span3 projectCard" ng-repeat="country in all_countries"> <div class="projectCardHeight"> <button class="btn close cardClose" ng-click="deleteCountry(country.id)">×</button> <div class="cardHeader">Country</div> <div class="cardBody">{{Country.iD}}</div> <div class="cardBody">{{Country.titlE}}</div> <div class="cardBody"><a href="#" id="pop{{Country.iD}}" class="btn btn-priMary" rel="popover" data-content="This is the <b>body</b> of Popover" data-original-title="Creativity Tuts">pop</a></div> </div> </div> </body>
Javascript代码:
var app = angular.module("app",[]); app.controller('my_controller',function($scopE) { $scope.all_countries = [ {"id":28,"title":"Sweden"},{"id":56,"title":"USA"},{"id":89,"title":"England"}]; }); function deleteCountry(id) { alert("Do something"); } $(document).ready(function () { $("a[rel=popover]") .popover({ placement: 'bottom',html: 'true' }) .click(function (E) { e.preventDefault(); }); });
以上是大佬教程为你收集整理的Bootstrap popover在AngularJs ng-repeat中不起作用全部内容,希望文章能够帮你解决Bootstrap popover在AngularJs ng-repeat中不起作用所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。