Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.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
Angularjs ionic framwork中的Angular ui FullCalendar事件打开模式单击功能_Angularjs_Events_Modal Dialog_Ionic Framework_Fullcalendar - Fatal编程技术网

Angularjs ionic framwork中的Angular ui FullCalendar事件打开模式单击功能

Angularjs ionic framwork中的Angular ui FullCalendar事件打开模式单击功能,angularjs,events,modal-dialog,ionic-framework,fullcalendar,Angularjs,Events,Modal Dialog,Ionic Framework,Fullcalendar,我正在使用Ionic框架,我已经成功地将FullCalendar移植到我的项目中 我可以在eventClick上调用函数,即使它完美地给出了该事件标题的警报 但我的主要目标是打开离子模式,而不是使用事件标题打开alert() 代码一直工作到警报到来,我是新来的爱奥尼亚需要一些想法如何实现这一点。到目前为止,我已经编写了下面的代码 app.js代码: $scope.calOptions = { editable : true, header

我正在使用Ionic框架,我已经成功地将FullCalendar移植到我的项目中

我可以在eventClick上调用函数,即使它完美地给出了该事件标题的警报

但我的主要目标是打开离子模式,而不是使用事件标题打开alert()

代码一直工作到警报到来,我是新来的爱奥尼亚需要一些想法如何实现这一点。到目前为止,我已经编写了下面的代码

app.js代码:

 $scope.calOptions = {
              editable : true,
              header : {
              left: 'prev',
              center: 'title,today',
              right: 'next'
              },
              eventClick: function(calEvent, jsEvent, view){
               var a=calEvent.description;
               var b=calEvent.title;
               alert('ALERT-1:' +a );

                 $scope.safeApply(function()
                 {
                 alert('ALERT-2:' + calEvent.description);
                 $scope.eventModal(a,b)
                 });
};


  $scope.eventModal=function(a,b){
  alert('ALERT-3:'+b);
  $scope.eventModal.show();
  }
  $ionicModal.fromTemplateUrl('modal.html', function($ionicModal) {
        $scope.eventModal = $ionicModal;
    },{
        scope: $scope,
        // The animation we want to use for the modal entrance
        animation: 'slide-in-up'
    });
更清楚地说,上面的代码显示“
eventClick
:”一直工作到“ALERT-3”,但是,在事件单击时,它调用函数“
$scope.eventModal=function(a,b)
”,然后在
$scope.eventModal.show()的下一行调用该函数它说“
show不是一个函数
”,我想用传递给“
$scope.eventModal=function(a,b)
”函数的变量打开modal

需要一个方法来打开传递给“
$scope.eventModal=function(a,b)
”的参数的模式


提前完成任务。

尝试做一些更简单的事情:

        eventClick: function(calEvent, jsEvent, view){
        $scope.a = calEvent.description;
        $scope.b = calEvent.title;
        $ionicModal.fromTemplateUrl('modal.html', {
            scope: $scope
        }).then(function (modal) {
            $scope.modal = modal;
            $scope.modal.show();
        }).catch(function(err){
            console.log(err);
        });
    };
在modal中,您可以绑定{{::a}和{{::b}或者您想用它们做的任何事情