Angularjs: Error: [ng:areq] Argument 'HomeController' is not a function, got undefined

前端 未结 24 1614
抹茶落季
抹茶落季 2020-11-27 12:22

This is my demo using angularjs, for creating a service file, and adding service to a controller.

I have two problems with my demo:

  • One is when I put <
24条回答
  •  囚心锁ツ
    2020-11-27 13:01

    I experienced this error once. My problem was that I wasn't adding the FILE_NAME_WHERE_IS_MY_FUNCTION.js

    so my file.html never found where my function was

    Once I add the "file.js" I resolved the problem

    
        
        ....
        ....
        ....
        
        
    
    

提交回复
热议问题