Why does this simple Angularjs using syncfusion throws me the error Uncaught TypeError: Cannot read property 'widget' of undefined

Why does this simple Angularjs using syncfusion throws me the error Uncaught TypeError: Cannot read property 'widget' of undefined

我对 Angularjs 比较陌生,我正在尝试使用 Syncfusion 来实现一些图表,所以我使用他们网站上提供的 angularjs CDN 从一个简单的代码开始。但这会给我带来错误。我不确定我做错了什么。我在 SO 或 Syncfusion 论坛中找不到与类似内容相关的任何 post。谁能帮帮我吗?如果这是重复的,我真的很抱歉

这是他们网站上的帮助文档:Help DOC Syncfusion AngularjS

这是CDN链接页面:https://help.syncfusion.com/js/cdn#gsc.tab=0

代码如下:

<!DOCTYPE html>
<html ng-app="DateCtrl">
<head>
    <title>Testing EJAngular</title>
        <!--jQuery Starts-->
        <script src="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></script>
        <!--jQuery Ends-->
        
        <!-- Angularjs CDN Starts -->
        <script src="http://cdn.syncfusion.com/js/assets/external/angular.min.js"></script>
        <!-- Angularjs CDN Ends -->
        
        <!--EJ Angular Starts-->
        <script src="http://cdn.syncfusion.com/18.2.0.44/js/common/ej.widget.angular.min.js"></script>
        <!--EJ Angular ENDS -->
    </script> 
</head>
<body ng-controller="DatePickerCtrl"> 
    <!--Container for ejDatePicker widget-->
    <input id="datepick" ej-datepicker e-value="dateValue" e-enableStrictMode="true" />
    
    <script type="text/javascript">
        var DateCtrl    =   angular.module('DateCtrl', ['ejangular'])
        
        DateCtrl.controller('DatePickerCtrl', function ($scope) {
            $scope.dateValue = "2/3/2013";
        });
    </script>
</body>
</html>

来自控制台的错误消息:

发布此答案,因为它可能对将来的某人有用。几乎不需要再添加 CDN。这里是所有的CDN:

<link href="http://cdn.syncfusion.com/18.2.0.44/js/web/flat-azure/ej.web.all.min.css" rel="stylesheet" />
<script src="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></script>
<script src="http://cdn.syncfusion.com/js/assets/external/jquery.easing.1.3.min.js"></script>
<script src="http://cdn.syncfusion.com/js/assets/external/jsrender.min.js"></script>
<script src="http://cdn.syncfusion.com/18.2.0.44/js/web/ej.web.all.min.js"></script> 

<!-- Angularjs CDN Starts -->
<script src="http://cdn.syncfusion.com/js/assets/external/angular.min.js"></script>
<!-- Angularjs CDN Ends -->

<!--EJ Angular Starts-->
<script src="http://cdn.syncfusion.com/18.2.0.44/js/common/ej.widget.angular.min.js"></script>
<!--EJ Angular ENDS -->

当我们没有引用所需的 Syncfusion 脚本文件时,通常会出现此问题。查看下面 link.

中的 AngularJS 文档

https://help.syncfusion.com/angularjs/overview

https://help.syncfusion.com/angularjs/accordion/getting-started#create-a-simple-accordion-in-angularjs

查看下面的 link DatePicker 演示。

http://jsplayground.syncfusion.com/a1zdhiii

查看以下 link 以了解有关 Syncfusion AngularJS DatePicker 的更多信息。

行为:https://help.syncfusion.com/angularjs/datepicker/behavior-settings

值绑定:https://help.syncfusion.com/angularjs/datepicker/data-and-event-binding

API参考:https://help.syncfusion.com/api/js/ejdatepicker

我们也可以在 Syncfusion 论坛中提出问题。

https://www.syncfusion.com/forums