vitalets / checklist-model

AngularJS directive for list of checkboxes
http://vitalets.github.io/checklist-model
MIT License
1.05k stars 207 forks source link

checklist-model does not work when using ng-route #135

Closed fhamarshi closed 8 years ago

fhamarshi commented 8 years ago

hello guys, I was trying to use checklist-model in my app but I caught an error that I have figured out it was because of using ngRoute in the same app.

var mainMod = angular.module('MainApp', ['ngRoute'],['checklist-model']);

The error:

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)

If there is any solution for this I will be happy to know.

Thanks for your efforts

fhamarshi commented 8 years ago

is supposed to be an array of all of your dependencies` var mainMod = angular.module('MainApp', 'ngRoute'],['checklist-model']);

beradrian commented 8 years ago

You should use it like this

 var mainMod = angular.module('MainApp', ['ngRoute', 'checklist-model']);

You have two arguments - first the module name and second an array with dependencies - not three arguments.