Error: Argument is not a function, got undefined

前端 未结 17 1891
不思量自难忘°
不思量自难忘° 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:26

    Remove the [] from the name ([myApp]) of module

    angular.module('myApp', [])
    

    And add ng-app="myApp" to the html and it should work.

提交回复
热议问题