Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/383.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 角度ui日历错误_Javascript_Jquery_Angularjs_Fullcalendar_Angular Ui - Fatal编程技术网

Javascript 角度ui日历错误

Javascript 角度ui日历错误,javascript,jquery,angularjs,fullcalendar,angular-ui,Javascript,Jquery,Angularjs,Fullcalendar,Angular Ui,我正在尝试配置angular ui日历,但运行时出错 TypeError: undefined is not a function at Object.eventsWatcher.onChanged (http://localhost/fisioGest/js/calendar.js:262:41) 我可以看到事件,一切似乎正常,但这个错误,我不能点击事件 这是my app.js的日历控制器: app.controller('main-controller',function($scope){

我正在尝试配置angular ui日历,但运行时出错

TypeError: undefined is not a function
at Object.eventsWatcher.onChanged (http://localhost/fisioGest/js/calendar.js:262:41)
我可以看到事件,一切似乎正常,但这个错误,我不能点击事件

这是my app.js的日历控制器:

app.controller('main-controller',function($scope){
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
this.tab=1;
this.titulopagina='Escritorio';
this.selectTab=function(setTab) {
    this.tab=setTab;
};
this.isSelected=function(checkTab) {
    return this.tab===checkTab;
};

  $scope.eventSources = [
[
    {
        "title": 'All Day Event',
        "start": new Date(y, m, d)
     },
     {
        "title": 'Long Event',
        "start": new Date(y, m, d - 5),
        "end": new Date(y, m, d - 2)
    }
  ]
];

$scope.calendarOptions = {
   calendar: {
   height: 500,
   editable: true,
   header: {
     left: 'title',
     center: '',
     right: 'prev,next basicWeek month agendaDay'
   },
 }
};


});
这就是我定义日历的方式:

<div id="calendar" ui-calendar="calendarOptions.calendar" ng-model="eventSources " class="p-relative p-10 m-b-20"></div>

查看源代码,有问题的行似乎是

event._start = $.fullCalendar.moment(event.start);
很可能你失踪了。看看它们,确保您已经包含了所有的依赖项(即在封面下进行重载的库),并且它们以正确的顺序加载

<script src="../bower_components/jquery/dist/jquery.js"></script>
<script src="../bower_components/jquery-ui/ui/jquery-ui.js"></script>
<script src="../bower_components/moment/moment.js"></script>

<script src="../bower_components/angular/angular.js"></script>
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.9.0.js"></script>
<script src="../bower_components/fullcalendar/dist/fullcalendar.js"></script>
<script src="../bower_components/fullcalendar/dist/gcal.js"></script>
<script src="../src/calendar.js"></script>
<script src="calendarDemo.js"></script>


是的,订单是我的错误之一。另一个是我正在使用的库。我从我的引导主题中包含了一些不能与fullcalendar.js一起正常工作的库,谢谢!!为什么要包括
jqueryui