【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 ...
随机推荐
- hdu 4763 Theme Section(KMP水题)
Theme Section Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) To ...
- iOS开发代码规范
1.关于命名 1.1统一要求 含义清楚, 尽量做到不需要注释也能了解其作用,若做不到,就加注释 使用全称不使用缩写 1.2类的命名 大驼峰式命名:每一个单词的首字母都采用大写字母例子: MFHomeP ...
- C#学习笔记(十):反射
反射 放射是指在程序运行时动态的获取类的信息的机制,我们下面来看看C#中的反射. Type Type 为 System.Reflection 功能的根,也是访问元数据的主要方式. 使用 Type 的成 ...
- linux使用getopt解析参数
getopt是linux下解析命令行参数的api.以linux内核代码的一个例子来说明: static void cmdline(int argc, char *argv[]){ int o ...
- python常用字符串操作
#!/usr/bin/env python name='cunzhang' print(name.capitalize())#首字母大写 print(name.count('n'))#统计字符有几个 ...
- 大一上C语言期末大作业-成绩管理系统
都过了半年的作业了,觉得做过去得留下点什么,所以整理了代码发一下博客. 声明:程序在DevC++下用c文件模式可以正常编译使用.(控制台程序) 程序结构:
- iis下FastCGI 的常见Error错误
用iis服务器+FastCGI配置的php环境会经常出现FastCGI Error的错误,像5 (0x80070005).2147467259(0x80004005).1413 (0x80070585 ...
- Codeforces Gym 100418B 暴力
Sum of sequencesTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/v ...
- Sales_item例子
Sales_item.h #ifndef SALES_ITEM_H #define SALES_ITEM_H #include<iostream> #include<string&g ...
- jquery 设置style:display 其实很方便的
("#id").css('display','none'); $("#id").css('display','block'); 或 $("#id&qu ...