【AngularJs】---"Error: [ng:areq] Argument 'fn' is not a function, got undefined"
项目中把controller、service抽取出来
一步一步没有报错
index那里加 <script src="js/controllers/XXController.js"></script>就报错了

【原因】
我抽取出来的controller头部也这样写了
angular.module('gflt.controllers', [])
正确写法
angular.module('gflt.controllers')
【AngularJs】---"Error: [ng:areq] Argument 'fn' is not a function, got undefined"的更多相关文章
- Error: [ng:areq] Argument 'xxxx' is not a function, got undefined
"Error: [ng:areq] Argument 'keywords' is not a function, got undefined" 代码类似这样的: <div n ...
- Error: [ng:areq] Argument ‘AppCtrl’ is not a function, got undefined
今天把用ionic做一个案例,和ionic示例项目差不多,只是用requirejs分离了controller,但是一直报错 Error: [ng:areq] Argument ‘AppCtrl’ is ...
- Error: [ng:areq] Argument 'LoginCtrl' is not a function, got undefined
- [ng:areq] Argument 'XXXXCtrl' is not a function, got undefined
angular.module('MyApp', []) 这里的[]重复了,以后引入新的controller.js文件会覆盖前面那个,所以此处的[]去掉 .controller('MyCtrl', fu ...
- 【AngularJs】---Error: [$injector:modulerr] Failed to instantiate module starter.services
[遇到问题解决问题,原谅我这个菜鸟] 加了services angular.module('starter', ['ionic', 'starter.controllers', 'starter.se ...
- Error: [ng:areq]
错误描述:Error: [ng:areq] http://errors.angularjs.org/1.4.8/ng/areq?p0=HelloCtrl&p1=not%20a%20functi ...
- 【AngularJS】 2.0 版本发布
[AngularJS] 2.0 版本发布 w5cValidator[AngularJS] 2.0 版本发布 w5cValidator 插件基于angular原有的表单验证,在原有的基础上扩展了一些 ...
- Argument 'xxx' is not a function, got undefined,初学Angular的第一个坑
终于考完试了,在没更新的这一段时间里,一直都在忙于应付考试.不过在期间也是接触到不少好玩的东西,比如Html5的Canvas,我用lufylegend的Html5引擎做了个<看你有所色>的 ...
- 【AngularJs】---表单验证
1. 必填项 验证某个表单输入是否已填写,只要在输入字段元素上添加HTML5标记required即可: <input type="text" required /> 2 ...
随机推荐
- POJ1228(稳定凸包问题)
题目:Grandpa's Estate 题意:输入一个凸包上的点(没有凸包内部的点,要么是凸包顶点,要么是凸包边上的点),判断这个凸包是否稳定.所谓稳 定就是判断能不能在原有凸包上加点,得到一个更 ...
- Edit Box多行显示时如何使滚动条始终在下方
两种方法: ① CEdit *pEdit = ((CEdit*)GetDlgItem(IDC_EDIT_RXDATA)); pEdit->LineScroll(pEdit->GetLin ...
- android Handler错误,不同的包Handler
1. import java.util.logging.Handler;这个包了会自动生成如下方法.当时还觉得和以前的不一样了,本不在意. Handler handler1= new Handler( ...
- 亦步亦趋在CentOS 6.4下安装Oracle 11gR2(x64)
安装前须知: 内存(RAM)的最小要求是 1GB,建议 2GB 及以上. 虚拟内存 swap 建议:内存为 1GB~2GB 时建议swap大小为内存大小的 1.5 倍:内存为 2GB~16GB 时建议 ...
- linux虚拟主机wdcp系列教程之四
当我们安装了网站服务管理系统wdcp之后,在使用过程中可能会出现这样或那样的疑问,下面给大家整理几点出来,方便大家学习. 1.wdcp支持的在线解压 有时小文件数据量,但整个目录上传会比较慢,如果打包 ...
- C++ Caption
主题 1. 设置控件的标题文本 2. 获取控件的标题文本 Caption属性 取得一个窗体的标题(caption)文字,或者一个控件的内容 红色的部分就是 Caption 标题 Set ...
- delphi HTML代码
################################属性 设置################################################字体设置{//-------- ...
- C语言经典算法100例(二)
11.判断某一年是否是闰年. //判断某一年份是否是闰年 int IsLeapYear(int year) { return (year % 400 == 0 || (year % 4 == 0) & ...
- C++编程对缓冲区的理解
本文转自:http://www.vckbase.com/index.php/wv/1592 什么是缓冲区 缓冲区又称为缓存,它是内存空间的一部分.也就是说,在内存空间中预留了一定的存储空间,这些存储空 ...
- 转:打造DropDownList,TreeView,ListBox无限极分类目录树
[csharp] view plaincopyprint? #region DropDownList无限递归显示层次关系 /// <summary> /// 创建无限分级下拉列表框 /// ...