简体   繁体   中英

eventClick in angular-ui-Calendar is not working

The UI works fine, the events are displayed correctly, but the only problem is eventClick isn't working. I thought jQuery needs to be updated to solve this issue, but I was wrong. There is something else which is preventing the eventClick from working! Please Help

This is my index.html

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

this is my 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不在传递给该指令的对象内

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM