简体   繁体   English

angular.js:13550错误:[ng:areq]参数'popCntrl'不是一个函数,未定义

[英]angular.js:13550 Error: [ng:areq] Argument 'popCntrl' is not a function, got undefined

I am teaching myself AngularJS and I am trying to get a simple popup to open. 我正在自学AngularJS,并尝试打开一个简单的弹出窗口。 But I keep getting the error in the title above. 但是我一直在上面的标题中得到错误。 I have looked at other peoples examples of this error and none have seem to match my use case. 我看过其他人关于此错误的示例,但似乎没有一个与我的用例匹配。

Things I have tried: -checked capitalization 我尝试过的事情:-检查大小写

Other than that I am not 100% sure where I am going wrong. 除此之外,我不是100%知道我要去哪里错了。

Below is the Plunker where I am testing my code. 下面是我正在测试代码的Plunker。

https://embed.plnkr.co/2blgWkwg0Se2SlLmuBrA/ https://embed.plnkr.co/2blgWkwg0Se2SlLmuBrA/

Any help at all would be awesome! 根本没有任何帮助!

You define your 'popUp' module correctly here: 您可以在此处正确定义“ popUp”模块:

angular.module('popUp',['ui.bootstrap']);

But you nevere include the 'popUp' module in your main application module ('myApp'). 但是,您永远不要在主应用程序模块('myApp')中包含“ popUp”模块。 Simply add it to the list of dependencies: 只需将其添加到依赖项列表中:

var myApp = angular.module("myApp", ['ui.router', 'popUp']);

Here is an updated plunkr with a working modal. 这是一个带有工作模式的更新的punkr

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Angular“angular.js:14110错误:[ng:areq]参数'fn'不是函数,未定义”控制器实例化异常 - Angular “angular.js:14110 Error: [ng:areq] Argument 'fn' is not a function, got undefined” exception on controller instantiation angular.js:10126错误:[ng:areq]参数[…]不是函数,未定义 - angular.js:10126 Error: [ng:areq] Argument […] is not a function, got undefined angular.js:13708错误:[ng:areq]参数'homeController'不是函数,未定义 - angular.js:13708 Error: [ng:areq] Argument 'homeController' is not a function, got undefined Angular.js:13424 错误:[ng:areq] 参数“enfermerosController”不是函数,未定义 - Angular.js: 13424 Error: [ng:areq] Argument 'enfermerosController' is not a function, got undefined angular.js:13424错误:[ng:areq]参数'fn'不是一个函数,得到了对象 - angular.js:13424 Error: [ng:areq] Argument 'fn' is not a function, got Object Angular JS和TypeScript-错误:ng:areq错误参数“参数'XXXXXX'不是函数,未定义” - Angular JS & TypeScript - Error: ng:areq Bad Argument “Argument 'XXXXXX' is not a function, got undefined” Angular JS-错误:ng:areq错误的参数参数'GameContoller'不是函数,未定义 - Angular JS - Error: ng:areq Bad Argument Argument 'GameContoller' is not a function, got undefined 错误:[ng:areq]参数不是函数,未定义 - Error: [ng:areq] Argument is not a function, got undefined 错误:[ng:areq]参数'ActsController'不是函数,未定义 - Error: [ng:areq] Argument 'ActsController' is not a function, got undefined 错误:[ng:areq]参数'meetupsController'不是一个函数,未定义 - Error: [ng:areq] Argument 'meetupsController' is not a function, got undefined
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM