I have seen that this issue has been resolved by people changing their linking order, though my order looks fine and still having this issue.
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:modulerr] Failed to instantiate module mwl.calendar.docs due to:
Error: [$injector:nomod] Module 'mwl.calendar.docs' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
<script src="~/lib/angular-bootstrap-calendar/dist/js/angular-bootstrap-calendar-tpls.js"></script>
<script>
var myApp = angular.module('myApp', ['mwl.calendar.docs', 'mwl.calendar', 'ngAnimate', 'ui.bootstrap']);
myApp.controller('calandardisp', function (moment, alert) {
var vm = this;
vm.calendarView = 'month';
vm.viewDate = new Date();
vm.events = [
{
title: 'An event',
type: 'warning',
startsAt: moment().startOf('week').subtract(2, 'days').add(8, 'hours').toDate(),
endsAt: moment().startOf('week').add(1, 'week').add(9, 'hours').toDate(),
draggable: true,
resizable: true
}, {
title: '<i class="glyphicon glyphicon-asterisk"></i> <span class="text-primary">Another event</span>, with a <i>html</i> title',
type: 'info',
startsAt: moment().subtract(1, 'day').toDate(),
endsAt: moment().add(5, 'days').toDate(),
draggable: true,
resizable: true
}, {
title: 'This is a really long event title that occurs on every year',
type: 'important',
startsAt: moment().startOf('day').add(7, 'hours').toDate(),
endsAt: moment().startOf('day').add(19, 'hours').toDate(),
recursOn: 'year',
draggable: true,
resizable: true
}
];
vm.isCellOpen = true;
vm.eventClicked = function (event) {
alert.show('Clicked', event);
};
vm.eventEdited = function (event) {
alert.show('Edited', event);
};
vm.eventDeleted = function (event) {
alert.show('Deleted', event);
};
vm.eventTimesChanged = function (event) {
alert.show('Dropped or resized', event);
};
vm.toggle = function ($event, field, event) {
$event.preventDefault();
$event.stopPropagation();
event[field] = !event[field];
};
});
</script>`
I have seen that this issue has been resolved by people changing their linking order, though my order looks fine and still having this issue.
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:modulerr] Failed to instantiate module mwl.calendar.docs due to: Error: [$injector:nomod] Module 'mwl.calendar.docs' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Markup:
'
{{ vm.calendarTitle }}
mwl.calendar.docs
is only used for the demo app, just remove it from your module dependencies and it should work fine.