Using AngularJS Controllers created with angular.module().controller()

后端 未结 2 1440
时光说笑
时光说笑 2020-12-08 02:18

I am still very new to AngularJS and am working through setting up my first application. I would like to be able to do the following:

angular.module(\'App.c         


        
2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 02:47

    If you are getting controller is not defined error you have to write your controller name within the quotes.

    or define your controller like this

    function controllerName()
    {
       //your code here
    }
    

    refer this: Uncaught ReferenceError:Controller is not defined in AngularJS

提交回复
热议问题