离子框架和角度ui日历问题?

时间:2022-02-25 11:24:54

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'); through my controller that i am using.

问题:日历加载正常,日历也接受事件,因为我似乎无法使用$ scope.myCalendar.fullCalendar('prev')访问日历对象;通过我正在使用的控制器。

If I am doing this wrong could you please provide an explanation as to how to access the calendar object?

如果我这样做错了,请您解释一下如何访问日历对象?

Plunker

1 个解决方案

#1


0  

$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');
  }

#1


0  

$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');
  }