我需要帮助,因为我无法正确安装角刚架。我正在遵循在https://www.angular-gantt.com/get-started/上使用CDN的说明。
我的html是:
{% verbatim %}
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/angular-gantt/1.2.6/angular-gantt.min.css"/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/angular.gantt/latest/angular-gantt.min.css"/>
</head>
<body ng-app="analyticsCtrl" ng-controller="planDatController">
<div gantt data=data></div>
<script src="//cdn.jsdelivr.net/angular.gantt/latest/angular-gantt.min.js"></script>
</body>
</html>
{% endverbatim %}
我的JS文件包含控制器和应用程序(路由正确):
angular.module('analyticsCtrl', ['gantt','rzModule', 'daterangepicker'])
.controller('planDatController', function($scope, $http, $interval, $filter, uiGridGroupingConstants ){
$scope.data = [
{name: 'row1', tasks: [
{name: 'task1', from: '2013-10-07T09:00:00', to: '2013-10-07T10:00:00'},
{name: 'task2', from: '2013-10-07T10:00:00', to: '2013-11-07T10:00:00'}
]
},
{name: 'row2', tasks: [
{name: 'task3', from: '2013-10-07T09:00:00', to: '2013-11-07T10:00:00'},
{name: 'task4', from: '2013-11-07T10:00:00', to: '2013-12-07T10:00:00'}
]
},
]
})
我觉得这应该简单明了,并且可能会丢失一些我现在无法发现的东西。还是我在做我不应该做的事情?感谢任何帮助!谢谢
编辑:部分错误
模块'gantt'不可用!您可能拼错了模块名称,或者忘记了加载它。如果要注册模块,请确保将依赖项指定为第二个参数。