Error: [ng:areq]

错误描述: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:8403)
    at Qa (http://localhost:8080/web/rs/angular.min.js:1:8490)
    at http://localhost:8080/web/rs/angular.min.js:1:38051
    at w (http://localhost:8080/web/rs/angular.min.js:1:27806)
    at D (http://localhost:8080/web/rs/angular.min.js:1:28162)
    at g (http://localhost:8080/web/rs/angular.min.js:1:25189)
    at g (http://localhost:8080/web/rs/angular.min.js:1:25206)

at http://localhost:8080/web/rs/angular.min.js:1:24829

Angular出现这种错误的原因,是由于没有在页面中使用模块引入controller导致的,修改内容如下:

添加:ng-app=‘app‘,然后在js中添加如下代码:

时间: 2024-08-12 01:01:42

Error: [ng:areq]的相关文章

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

"LoginCtrl'"该控制器也定义了 改为以下 最后发现: Error: [ng:areq] Argument 'LoginCtrl' is not a function, got undefined

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

项目中把controller.service抽取出来 一步一步没有报错 index那里加 <script src="js/controllers/XXController.js"></script>就报错了 [原因] 我抽取出来的controller头部也这样写了 angular.module('gflt.controllers', []) 正确写法 angular.module('gflt.controllers') [AngularJs]---"E

angular min js 118 Error ng areq http //errors angularjs

1.错误描述 angular.min.js:118 Error: [ng:areq] http://errors.angularjs.org/1.5.8/ng/areq?p0=username&p1=not%20a%20function%2C%20got%20undefined at Error (native) at http://127.0.0.1:8020/AngularJS/js/angular.min.js:6:412 at sb (http://127.0.0.1:8020/Angu

angular Error: [ng:areq]

在使用augularjs的时候,爆了个错误: 后来经过对比,原来是我的<html>标签多了点东西

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

1,错误如图所示 简单说下错误原因是:没有js没有注册进去. 解决方法: 1.看下index.html有没有引入你的js文件. 2.看下app.js有没有注册js,比如我这次就是这步没做好,合并代码时冲掉了.如图 在后面加上丢失的invoidFolder.controllerrjs就好了.希望对别人有帮助 原文地址:https://www.cnblogs.com/qianyy/p/10485230.html

angular中出现错误的提示指令[ng:areq]的原因

angular.min.js:80 Error: [ng:areq] http://errors.angularjs.org/1.2.9/ng/areq?p0=sellerService&p1=not%20a%20function%2C%20got%20undefined at angular.min.js:2 at ub (angular.min.js:14) at Pa (angular.min.js:14) at angular.min.js:57 at angular.min.js:45

用指令修改DOM

对于HTML5,input元素有autofocus这个属性,用户在第一次进入界面时就可以和用户交互,对于浏览器来说,可以 把键盘焦点定位在某个元素上,但是对于非input元素,则不可以,我们可以使用指令实现焦点定位. 1:html文件: 2:autoFocus.js 指令文件 3:directCtrl.js 控制器文件 (function(){ 'use strict'; var myModule = angular.module('myDirectApp',[]); myModule.cont

Angularjs1.2版本与1.3版本中控制器的问题

写写今天用ng遇到的一个问题吧.因为刚学习就学视频里面写例子,视频里用的是ng1.2.10版本,我用的是1.5.0. 刚开始的时候我按照ng视频的里面的写,但是控制器就是不能绑定好,后来和同学讨论加搜索终于解决了,接下来看解释:从ng1.3开始就不支持全局的controller,这话怎么理解,ng1.3以前的版本我们设定好控制器后就可以直接在我们要引入的文件中直接引用而不报错.1.3以后 的版本后再直接引用就会报错,错误描述:Error [ng:areq]http://errors.angula

Angular路由中常见错误描述

1.错误描述: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.