Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/386.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.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
Javascript Angular.js和Bootstrap popover_Javascript_Angularjs_Twitter Bootstrap_Angular Ui Bootstrap_Bootstrap Popover - Fatal编程技术网

Javascript Angular.js和Bootstrap popover

Javascript Angular.js和Bootstrap popover,javascript,angularjs,twitter-bootstrap,angular-ui-bootstrap,bootstrap-popover,Javascript,Angularjs,Twitter Bootstrap,Angular Ui Bootstrap,Bootstrap Popover,我有一个带有angular.js的单页应用程序。其他部分正在工作,但我无法运行翻转。 这是我的控制器。我将在这个控制器上使用 angular.module('foodDeliveryApp') .controller('RestaurantListController', restaurantListController); function restaurantListController($scope,$sce, DataService, $rootScope

我有一个带有angular.js的单页应用程序。其他部分正在工作,但我无法运行翻转。 这是我的控制器。我将在这个控制器上使用

    angular.module('foodDeliveryApp')
       .controller('RestaurantListController', restaurantListController);

    function restaurantListController($scope,$sce, DataService, $rootScope, $location, $timeout) {

    $scope.htmlPopover = $sce.trustAsHtml('<b style="color: red">hover on me as well</b>');

    $scope.hovered = function(hovering){
        $timeout(function() {
            console.log('update with timeout fired');
            if(hovering.objHovered==true){
                hovering.popoverOpened2=true;
            }
        }, 500);
    }
  }
angular.module('foodDeliveryApp'))
.控制器(“RestaurantListController”,RestaurantListController);
函数restaurantListController($scope、$sce、DataService、$rootScope、$location、$timeout){
$scope.htmlpover=$sce.trustAsHtml('hover on me all');
$scope.hovered=函数(悬停){
$timeout(函数(){
log('updatewithtimeout-fired');
if(hovering.objHovered==true){
悬停。popoverOpened2=true;
}
}, 500);
}
}
以上部分是popover函数。 其他功能有很多功能,但并不重要

    <span ng-init="popoverOpened1=false" ng-mouseover="popoverOpened1=true" ng-mouseleave="popoverOpened1=false">
            <button class="btn btn-default" uib-popover-html="htmlPopover"
                    popover-trigger="none" popover-placement="bottom-left" popover-is-open="popoverOpened1" >
               <span>hover me</span>
            </button>
   </span>

盘旋我
这是HTML中由同一控制器控制的HTML部分。
有人知道在没有jquery的情况下如何显示popover吗?

您可以在这里使用指令。请检查:它有一些jquery部分,我只想使用angular.jsOk,所以我从您上面的评论中了解到,您不想要jquery,而想要angular js中的popover。如果是这种情况,我建议您检查popover的角度材质控制: