Error: Argument is not a function, got undefined

前端 未结 17 1851
不思量自难忘°
不思量自难忘° 2020-12-07 19:35

Using AngularJS with Scala Play, I\'m getting this error.

Error: Argument \'MainCtrl\' is not a function, got undefined

I\'m try

17条回答
  •  不思量自难忘°
    2020-12-07 20:09

    To fix this problem, I had to discover that I misspelled the name of the controller in the declaration of Angular routes:

    .when('/todo',{
                templateUrl: 'partials/todo.html',
                controller: 'TodoCtrl'
            })
    

提交回复
热议问题