简体   繁体   English

使用带有angularjs的wijmo事件日历

[英]Using wijmo event calender with angularjs

Hell, I'm trying to use the wijmo event calender with the AngularJS liabry, but the appointments binding isn't working correctly. 好吧,我正在尝试使用带有AngularJS liabry的wijmo事件日历,但是约会绑定无法正常工作。 This is my html: 这是我的HTML:

<html>
    <head>
        <title>Control Tests</title>
        <script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
        <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.min.js" type="text/javascript"></script>

        <link href="http://cdn.wijmo.com/themes/rocket/jquery-wijmo.css" rel="stylesheet"
              title="metro-jqueryui" type="text/css" />

        <link href="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20131.7.min.css" rel="stylesheet" type="text/css" />

        <script src="http://cdn.wijmo.com/jquery.wijmo-open.all.3.20131.7.min.js" type="text/javascript"></script>
        <script src="http://cdn.wijmo.com/jquery.wijmo-pro.all.3.20131.7.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="http://cdn.wijmo.com/external/globalize.min.js"></script>

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
        <script src="http://cdn.wijmo.com/external/angular.wijmo.js" type="text/javascript"></script>

        <script src="../../Scripts/Controller/MainController.js" type="text/javascript"></script>
    </head>
    <body>
        <script>
            $(document).ready(function () {
                $(".wijevcal").wijevcal();
            });
        </script>

        <div ng-app ng-controller="MainController">
            <div class="wijevcal" appointments="{{calAppointments}}"></div>
        </div>
    </body>
</html>

And this is the source of the Controller: 这是Controller的来源:

function MainController($scope)
{
    $scope.calAppointments = [{
        start: new Date(2013, 5, 23, 15, 30)
    }];
}

Can someone tell me, why the start date isn't applied to the calendar? 有人能告诉我,为什么开始日期不适用于日历?

I fixed it on my own. 我自己修理了它。

I had to call 我不得不打电话

var app = angular.module("MyApp", ["wijmo"]);

at the beginning of the script and now I can use the tag 在脚本的开头,现在我可以使用标签

<wijevcal></wijevcal>

是的,您需要添加Wijmo模块才能使用Wijmo提供的自定义指令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM