angular.module('MyApp', [])    这里的[]重复了,以后引入新的controller.js文件会覆盖前面那个,所以此处的[]去掉
.controller('MyCtrl', function($scope) { })
angular.module('MyApp')
.controller('MyCtrl',function(){ })

注意:以后引用新的controller.js文件不用写 [ ]

[ng:areq] Argument 'XXXXCtrl' is not a function, got undefined的更多相关文章

  1. Error: [ng:areq] Argument 'xxxx' is not a function, got undefined

    "Error: [ng:areq] Argument 'keywords' is not a function, got undefined" 代码类似这样的: <div n ...

  2. Error: [ng:areq] Argument ‘AppCtrl’ is not a function, got undefined

    今天把用ionic做一个案例,和ionic示例项目差不多,只是用requirejs分离了controller,但是一直报错 Error: [ng:areq] Argument ‘AppCtrl’ is ...

  3. 【AngularJs】---"Error: [ng:areq] Argument 'fn' is not a function, got undefined"

    项目中把controller.service抽取出来 一步一步没有报错 index那里加 <script src="js/controllers/XXController.js&quo ...

  4. Error: [ng:areq] Argument 'LoginCtrl' is not a function, got undefined

  5. Argument 'xxx' is not a function, got undefined,初学Angular的第一个坑

    终于考完试了,在没更新的这一段时间里,一直都在忙于应付考试.不过在期间也是接触到不少好玩的东西,比如Html5的Canvas,我用lufylegend的Html5引擎做了个<看你有所色>的 ...

  6. angular报错:angular.min.js:118Error: [ng:areq] http://errors.angularjs.org/1.5.8/ng/areq

    报错代码如下: <div ng-controller="HelloAngular"> <p>{{greeting.text}},angular</p& ...

  7. Error: [ng:areq]

    错误描述:Error: [ng:areq] http://errors.angularjs.org/1.4.8/ng/areq?p0=HelloCtrl&p1=not%20a%20functi ...

  8. jquery源码中的(function(window, undefined){})(window)【转】

    (function( window, undefined ) {})(window);这个,为什么要将window和undefined作为参数传给它? (function( $, undefined ...

  9. JS 关于(function( window, undefined ) {})(window)写法的理解

    JS 关于(function( window, undefined ) {})(window)写法的理解 [网络整理] (function( window, undefined ) {})(windo ...

随机推荐

  1. 我来谈谈PHP和JAVA在web开发上的的区别

    这里的标题写的是谈谈PHP和JAVA的区别,其实是委婉的说法,其实别人是想听PHP好还是JAVA好!!! 从而从中找到存在感!!! 因为由于我是从多年的php开发转到java开发的.所以最,不时的有好 ...

  2. linux下的shell脚本的使用

    什么是shell? Shell是一个命令解释器,它在操作系统的最外层,负责直接与用户进行对话,把用户的输入解释给操作系统,并处理各种各样的操作系统的输出结果,输出到屏幕反馈给用户.这种对话方式可是交互 ...

  3. PHP-----浅谈垃圾回收机制

    前言 大多数编程语言都会有自身的垃圾回收机制,php也不例外.经常听很多人说gc,也就是垃圾回收器,全程为Garbage Collection. 在php5.3之前,是不包括垃圾回收机制的,也没有专门 ...

  4. appium安装完成后运行和执行python脚本的错误合集

    1.第一个错误如下: main.js: error: argument "--app": Expected one argument. null 这个一般是appium服务端安装的 ...

  5. Python -- tabulate 模块,

    pip install tabulate >>> from tabulate import tabulate >>> table = [["Sun&quo ...

  6. mysql 开发进阶篇系列 37 工具篇 perror (错误代码查看工具)与总结

    一.  perror 错误代码查看工具   在mysql 的使用过程中,可能会出现各种各样的error.这些error有些是由于操作系统引起的,比如文件或者目录不存在等等,使用perror的作用就是解 ...

  7. php,vue,vue-ssr 做出来的页面有什么区别?

    欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由shirishiyue发表于云+社区专栏 目前我这边的web页面,都是采用php+smarty模板生成的,是一种比较早期的开发模式.好 ...

  8. jenkins+Android+gradle持续集成

    本文Android自动化打包采用jenkins+gradle+upload to pyger的方式来实现,job执行完后只需要打开链接扫描二维码即可下载apk. 一.环境准备 1.下载Android ...

  9. Animate.css(一款有意思的CSS3动画库)

    官网:https://daneden.github.io/animate.css/ animate.css 是一款跨浏览器的动画库. 使用方式: 在页面的 <head>中引入样式文件: & ...

  10. 延迟初始化Lazy

    延迟初始化出现于.NET 4.0,主要用于提高性能,避免浪费计算,并减少程序内存要求.也可以称为,按需加载. 基本语法: Lazy<T> xx = new Lazy<T>(); ...