项目中把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"的更多相关文章

  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. Error: [ng:areq] Argument 'LoginCtrl' is not a function, got undefined

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

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

  5. 【AngularJs】---Error: [$injector:modulerr] Failed to instantiate module starter.services

    [遇到问题解决问题,原谅我这个菜鸟] 加了services angular.module('starter', ['ionic', 'starter.controllers', 'starter.se ...

  6. Error: [ng:areq]

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

  7. 【AngularJS】 2.0 版本发布

    [AngularJS] 2.0 版本发布 w5cValidator[AngularJS] 2.0 版本发布   w5cValidator 插件基于angular原有的表单验证,在原有的基础上扩展了一些 ...

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

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

  9. 【AngularJs】---表单验证

    1. 必填项 验证某个表单输入是否已填写,只要在输入字段元素上添加HTML5标记required即可: <input type="text" required /> 2 ...

随机推荐

  1. hibernate[版本四]知识总结

    1.hibernate是orm对象关系映射,是对jdbc的封装 2.hibernate版helloworld 2.1导入jar <dependencies> <dependency& ...

  2. 剑指OFFER之二进制中1的个数(九度OJ1513)

    题目描述: 输入一个整数,输出该数二进制表示中1的个数.其中负数用补码表示. 输入: 输入可能包含多个测试样例.对于每个输入文件,第一行输入一个整数T,代表测试样例的数量.对于每个测试样例输入为一个整 ...

  3. HR(人事管理)

    HRMS(Human Resource Management System) --人员 per_people_f --人员分配 per_all_assignments_f --要素 DECLARE l ...

  4. ALT(预警)

    1. Alert简介 Alert是一种Oracle系统中的一种机制,它可以监视系统数据库,在规定的情况下给规定用户一个通知,通知可以是邮件或者其他形式,在标注的系统和客户化系统中都是可以定义使用的 2 ...

  5. flex-mp3

    Mp3Player.as package ddw.adobe { import flash.events.Event; import flash.events.IOErrorEvent; import ...

  6. 使用TopShelf轻松开发Window服务

    关于TopShelf 描述: Topshelf is a framework for hosting services written using the .NET framework. The cr ...

  7. 【M15】了解异常处理(exception handling)的成本

    1.为了在运行期处理异常,程序必须做大量额外的工作.比如,即使抛出异常,也必须保证离开作用域的栈上对象执行析构方法.因此,必须记录try语句的进入点和离开点,记录catch语句能够处理的异常等.这就意 ...

  8. Elasticsearch是一个分布式可扩展的实时搜索和分析引擎,elasticsearch安装配置及中文分词

    http://fuxiaopang.gitbooks.io/learnelasticsearch/content/  (中文) 在Elasticsearch中,文档术语一种类型(type),各种各样的 ...

  9. android 自定义按钮实现 home键 和返回键

    由于在自己做的东西中用到了就总结一下,自己做了测试 在一个程序运行中如果按 返回键  分别执行了 : onpause()     onStop()   onDestory()方法 如果点击 home键 ...

  10. How to Display Image In Picturebox in VC++ from Iplimage and Mat

    Introduction This tip/trick will be useful to OpenCV programmers, who wish to use Windows Form appli ...