实际上我想创建一个像Google日历这样的日历,用户可以在其中创建活动。因此,当用户点击单元格时,我想要一个弹出窗口。请给我任何建议。我也在ng-grid和ui-calendar之间混淆,这是绘制日历,绑定点击事件等的最佳选择。
提前致谢。
答案 0 :(得分:3)
没有理由担心ng-grid,你可以用它来构建日历,但是ui-calendar的存在使得这只是一个很好的编码/ css练习。
Angular UI Calendar(https://github.com/angular-ui/ui-calendar)是jQuery fullcalendar插件(http://arshaw.com/fullcalendar/docs/)的包装器。您可以使用后者的文档,并通过指令传递选项。
上面引用的GitHub页面中的示例:
myAppModule.controller('MyController', function($scope) {
/* config object */
$scope.calendarConfig = {
height: 450,
editiable: true,
dayClick: function(){
scope.$apply($scope.alertEventOnClick);
}
};
});
<div ui-calendar="calendarOptions" ng-model="eventSources">