angular bootstrap 日历不显示

angular bootstrap calendar not displaying

我正在尝试在我的 apache cordova 应用程序中使用 angular bootstrap 日历

HTML:

            <ion-view>
                <ion-content has-header="true" padding="true" ng-app="app" data-ng-controller="calendarController">
                    {{test}}
                    <mwl-calendar view="calendarView"
                      current-day="calendarDay"
                      events="events">
                </mwl-calendar>
                </ion-content>
            </ion-view>

控制器:

.controller('calendarController', ['$scope', '$state', 'moment', function ($scope, $state, moment) {

$scope.test = 'Test the controller';
$scope.calendarView = 'week';
$scope.calendarDay = new Date();
$scope.events = [
 {
     title: 'My event title', // The title of the event
     type: 'info',
     startsAt: new Date(2013, 5, 1, 1),
     endsAt: new Date(2014, 8, 26, 15),
     editable: false,
     deletable: false,
     incrementsBadgeTotal: true
 }
];
}]);

我已经包含了相关依赖项的链接,包括 moment.js 但是我收到一条消息 'the value passed to current day attribute is not set'。我已确保 moment.js 链接在主 app.js 文件之前,该文件包含类似问题中建议的控制器,但我仍然收到相同的消息。我是 angular 的新手,如果有人能提供任何帮助,我将不胜感激。

如果您正在使用 angular boostrap 日历,您需要知道某些属性是必需的。

我在您的 html 文件中没有看到任何 view-date 属性定义。而不是

 current-day="calendarDay"

尝试:

 view-date="calendarDay"

更多细节可以查看官方项目的README文件。