整合完整的日历离子视图

时间:2016-01-06 11:46:58

标签: angularjs ionic-framework ngcordova

我已经更新了所有的cordova包,只是一个离子初学者。任何人都可以帮助在离子页面中集成完整的日历视图。 控制器页面

.controller('pageCtrl', function($scope, $cordovaCalendar) {

    $scope.createEvent = function() {
        $cordovaCalendar.createEvent({
            title: 'Space Race',
            location: 'The Moon',
            notes: 'Bring sandwiches',
            startDate: new Date(2015, 0, 15, 18, 30, 0, 0, 0),
            endDate: new Date(2015, 1, 17, 12, 0, 0, 0, 0)
        }).then(function (result) {
                console.log("Event created successfully");
            }, function (err) {
                console.error("There was an error: " + err);
            });
    }

})

查看页面

<ion-view title="Page">

    <ion-content overflow-scroll="true" padding="true" class="has-header"></ion-content>

    <ion-content ng-controller="pageCtrl">
        <ion-view class="calendar" ng-click="createEvent()">Create Event</ion-view>
    </ion-content>

</ion-view>

0 个答案:

没有答案