项目中把controller.service抽取出来 一步一步没有报错 index那里加 <script src="js/controllers/XXController.js"></script>就报错了 [原因] 我抽取出来的controller头部也这样写了 angular.module('gflt.controllers', []) 正确写法 angular.module('gflt.controllers')…
"Error: [ng:areq] Argument 'keywords' is not a function, got undefined" 代码类似这样的: <div ng-app="xxxx" ng-controller="xxxx"> //... </div> var app = angular.module("xxxx", []); app.controller('xxxx', functio…
今天把用ionic做一个案例,和ionic示例项目差不多,只是用requirejs分离了controller,但是一直报错 Error: [ng:areq] Argument ‘AppCtrl’ is not a function, got undefined define(function (require) { 'use strict'; var controllers = angular.module('starter.controllers', []); controllers.cont…
angular.module('MyApp', []) 这里的[]重复了,以后引入新的controller.js文件会覆盖前面那个,所以此处的[]去掉 .controller('MyCtrl', function($scope) { }) angular.module('MyApp') .controller('MyCtrl',function(){ }) 注意:以后引用新的controller.js文件不用写 [ ]…
[遇到问题解决问题,原谅我这个菜鸟] 加了services angular.module('starter', ['ionic', 'starter.controllers', 'starter.services']) 出现下面问题 [原因] index.html没有引入services.js ~~~~(>_<)~~~~ …
错误描述:Error: [ng:areq] http://errors.angularjs.org/1.4.8/ng/areq?p0=HelloCtrl&p1=not%20a%20function%2C%20got%20undefined at Error (native)    at http://localhost:8080/web/rs/angular.min.js:1:503    at qb (http://localhost:8080/web/rs/angular.min.js:1:…
[AngularJS] 2.0 版本发布 w5cValidator[AngularJS] 2.0 版本发布   w5cValidator 插件基于angular原有的表单验证,在原有的基础上扩展了一些错误提示的功能,让大家不用在每个表单上写一些提示信息的模板,专心的去实现业务逻辑. 代码地址:https://github.com/why520crazy/w5c-validator-angular 关于v1.x版本的介绍参见:http://www.ngnice.com/posts/69f774dc…
终于考完试了,在没更新的这一段时间里,一直都在忙于应付考试.不过在期间也是接触到不少好玩的东西,比如Html5的Canvas,我用lufylegend的Html5引擎做了个<看你有所色>的游戏.还有最近刚开始玩的Angular. Angular也是早有听说了啊,一直没闲下功夫研究,趁着放假,学一学.慕课网(www.imooc.com)里有一套教程,还是很不错的.但是真正上手编码的时候就发现,尼玛!例子都跑不起来,全是报错,Argument 'xxx' is not a function, go…
1. 必填项 验证某个表单输入是否已填写,只要在输入字段元素上添加HTML5标记required即可: <input type="text" required /> 2. 最小长度验证表单输入的文本长度是否大于某个最小值,在输入字段上使用AngularJS指令 ng-minleng= "{number}": <input type="text" ng-minlength="5" /> 3. 最大长度验证…