我解决了 - 这是一个CSS问题
我正在尝试整合https://github.com/mattlewis92/angular-bootstrap-calendar。没有错误,但不是按照演示页面呈现日历,而是在屏幕上打印出日期等。
这是我的HTML:
div ng-controller="calendarCtrl">
<mwl-calendar
view="calendarView"
current-day="calendarDay"
events="events"
view-title="calendarTitle"
auto-open="true">
</mwl-calendar>
</div>
这是控制器:
app.controller('calendarCtrl', function($scope, $log, userData){
var invoiceData = userData.getActivityData();
$scope.calendarView = 'month';
$scope.calendarDay = new Date();
$scope.calendarTitle = "BirdsEyeView";
if( invoiceData[0]){
//$log.debug("in cal array:"+$scope.calendarDay);
}
else {
$log.debug("No invoice data");
}
$scope.invoiceData = invoiceData;
$scope.events = [
{
title: 'My event title', // The title of the event
type: 'info', // The type of the event (determines its color). Can be important, warning, info, inverse, success or special
startsAt: new Date(2015,6,10,1), // A javascript date object for when the event starts
endsAt: new Date(2015,6,10,15), // Optional - a javascript date object for when the event ends
editable: false, // If edit-event-html is set and this field is explicitly set to false then dont make it editable. If set to false will also prevent the event from being dragged and dropped.
deletable: false, // If delete-event-html is set and this field is explicitly set to false then dont make it deleteable
incrementsBadgeTotal: true, //If set to false then will not count towards the badge total amount on the month and year view
recursOn: 'year' // If set the event will recur on the given period. Valid values are year or month
}
];
});
答案 0 :(得分:0)
这是一个CSS问题 - 从npm下载没有css。手动下载也是如此。