我试图在我的应用中使用[checklist-model](https://github.com/vitalets/checklist-model)模块,但是我发现了一个错误,我发现它是因为使用(ngRoute)模块在同一个应用程序。当使用ng-route时,checklist-model模块不工作
var mainMod = angular.module('MainApp', ['ngRoute'],['checklist-model']);
mainMod.config(['$routeProvider',function($routeProvider) {
$routeProvider
.when("/patient-list", {
templateUrl: "patient-list.html",
controller: "dbCtrl"
})
.when("/patientRecord", {
templateUrl: "patientRecord.html",
controller: "MainCtrl2"
})
.otherwise({
templateUrl: "patient-list.html",
controller: "dbCtrl"
})
}
]);
错误:
angular.min.js:6Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.24/ $injector/modulerr?p0=MainApp&p1=Error%3…%20gc%20(http%3A%2F%2Flocalhost%2Ftest%2Ffiles%2Fangular.min.js%3A36%3A309)
如果有这方面的任何解决方案,我会很高兴知道。
感谢你的努力
第二个参数应该是所有依赖关系的数组。尝试angular.module('MainApp',['ngRoute','checklist-module']); – 10BitDev
另外,如果您使用angular.js库的未经版本化的版本进行开发,您将获得更多有用的错误消息。 – 10BitDev
谢谢你,先生它现在的作品:) –