簡體   English   中英

angular-ui-Calendar中的eventClick無法正常工作

[英]eventClick in angular-ui-Calendar is not working

用戶界面工作正常,事件可以正確顯示,但是唯一的問題是eventClick無法正常工作。 我認為需要更新jQuery才能解決此問題,但是我錯了。 還有其他原因導致eventClick無法正常工作! 請幫忙

這是我的index.html

 <div class="container"> <div ui-calendar='$ctrl.uiConfig.calendar' ng-model="$ctrl.eventSources"> </div> </div> 

這是我的controller.js

 (function(){ class CalendarComponent { constructor() { this.eventSources = []; this.uiConfig = { calendar : { editable : true, header : { left : 'prev,next,today', center : 'title', right : 'month,agendaWeek,agendaDay' } }, eventClick: function(event,jsEvent,view){ console.log("holla"); } }; this.eventSources = [ { events: [ {title: "finger painting", start: "2016-07-28T18:00+05:30", location: "SAC middle earth", allDay:false}, {title: "hand painting", start: "2016-07-27T21:30+05:30",location: "CLT", allDay:false} ], color: "red" }, { events: [ {title: "lightmusic", start: "2016-07-29T18:00+05:30", location: "OAT", allDay:false}, {title: "Rock music", start: "2016-07-28T21:30+05:30",location: "SAC middle earth", allDay:false} ], color: "blue" } ]; } } angular.module('sangamApp') .component('calendar', { templateUrl: 'app/calendar/calendar.html', controller: CalendarComponent }); })(); 

嘗試將uiConfig對象傳遞給ui-calendar ,現在eventClick不在傳遞給該指令的對象內

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM