我正在使用带完整日历的ui日历日历,是否想显示鼠标悬停时的事件详细信息。我尝试这样做,但是它给了我以下错误:
ReferenceError:
未定义$ popover 在HTMLAnchorElement。$ scope.eventMouseover
我的html:
<div id="eventContent" title="Event Details">
<div id="eventInfo"></div>
<p><strong><a id="eventLink" target="_blank">Read More</a></strong></p>
</div>
控制器:
$scope.eventMouseover = function(event, jsEvent, view) {
// question: how can I pass 'event' to popover template?
element = $(jsEvent.target).closest('.fc-event');
console.log(event);
popover = $popover(element, {
placement: 'bottom',
contentTemplate: 'calendar-item-popover.html',
foo: 'foo'
});
delete event.source; // 'source' property causes stack overflow, no idea why
popover.$scope.event = event;
//popover.$scope.event = {title: event.title, start: event.start};
popover.$promise.then(popover.show);
};
$scope.eventMouseout = function(){
popover.hide();
popover = null;
}
/* config object */
$scope.uiConfig = {
calendar:{
height: 550,
editable: true,
header:{
left: 'title',
center: '',
right: 'today prev,next'
},
eventClick: $scope.alertOnEventClick,
eventDrop: $scope.alertOnDrop,
eventResize: $scope.alertOnResize,
eventMouseover: $scope.eventMouseover
}
};
有人可以帮我吗?