0

The following is the error message that I got when I tried to run an example of angular ui calendar.

TypeError: Cannot read property 'length' of undefined at Object.getTokens (app/bower_components/ui-calendar-master/src/calendar.js:87:36)

The following is the order of js file

  • "bower_components/JQuery/jquery.js"
  • "bower_components/JQueryUI/UI/jquery-ui.js"
  • "bower_components/angular/angular.js"
  • "bower_components/angular-ui-bootstrap/ui-bootstrap.js"
  • "bower_components/ui-calendar-master/src/calendar.js"
  • "bower_components/fullcalendar/fullcalendar.js"
  • "bower_components/fullcalendar/gcal.js"

How to fix this error? Thank you for any help.

1 Answer 1

0

Try to include the momen.js in your bower configuration. This is how I've got configured:

        <!-- Bootstrap -->
    <script src="js/ui-bootstrap-tpls-0.11.2.min.js"/>
    <script src="js/bootstrap.min.js"></script>
    <!-- Javascript Libraries -->
    <script src="js/lib/moment.min.js"></script>
    <script src="js/fullcalendar.min.js"></script>
    <script src="js/calendar.min.js"></script>
    <script src="js/gcal.js"></script>
    <script src="js/calendar.js"></script>  
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.