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

前端 未结 24 1562
抹茶落季
抹茶落季 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 12:59

    I had the same problem, but I forgot to include the file into grunt/gulp minimization process.

    grunt.initConfig({
      uglify: {
        my_target: {
          files: {
            'dest/output.min.js': ['src/input1.js', 'src/missing_controller.js']
          }
        }
      }
    });
    

    Hope that helps.

提交回复
热议问题