[英]Ionic framework and angular ui calendar issue?
I am using ui calendar to provide a calendar view in my application. 我正在使用ui日历在我的应用程序中提供日历视图。
Question: The calendar loads fine and the calendar also accepts events just that I can not seem to access the calendar object using $scope.myCalendar.fullCalendar('prev');
问题:日历加载正常,日历也接受事件,我似乎无法使用
$scope.myCalendar.fullCalendar('prev');
访问日历对象$scope.myCalendar.fullCalendar('prev');
through my controller that i am using. 通过我正在使用的控制器。
If I am doing this wrong could you please provide an explanation as to how to access the calendar object? 如果我这样做错了,请您解释一下如何访问日历对象?
$scope.myCalendar.fullCalendar('prev')
this essentially invokes a function prev() on the encapsulated calendar object. 这实质上是在封装的日历对象上调用函数prev()。
fullCalendar.js:line 132: var r = calendar[options].apply(calendar, args);
After invoking the function it will return this
which is the result because check this out in fullCalendar.js 调用它会返回功能后,
this
是结果,因为在fullCalendar.js检查了这一点
function prev() {
renderView(-1);
}
This is not returning anything. 这不会返回任何东西。
If you want to get date try passing 'getDate' to fullCalendar
如果你想获得日期,请尝试将'getDate'传递给
fullCalendar
$scope.previousEntries = function(){
$scope.myCalendar.fullCalendar('prev');
var calenderDate = $scope.myCalendar.fullCalendar('getDate');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.