我有两个指令,我想在其中一个中公开一个API,供其他人使用。在的指导下,当我需要另一个指令的控制器时,我得到了这个错误:
Error: No controller: foo
at Error (<anonymous>)
at getControllers (http://localhost:3000/vendor/angular/angular.js:4216:19)
at nodeLinkFn (http://localhost:3000/vendor/angular/angular.js:4345:35)
at compositeLinkFn (
我正在将directive迁移到component结构,一切都进行得很顺利--只是我有一个动态模板,正在动态编译。除了我试图将ctrl传递到$compile之外,工作正常:
我改变了:
$compile($element.contents())($scope);
它的作用是:
$compile($element.contents())(ctrl);
现在我发现了一个错误:
child-component.component.js:76 TypeError: b.$watch is not a function
at Object.link (http://localhost:3000/
我的角度应用程序出错了。在客户端控制台上,我得到:
Denying load of chrome-extension://fiekimdgbphfmnlbiahcfdgcipcopmep/js/lib/angular/angular.min.js.map. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
我认为这与我加载javascripts的方式有关:
<head>
<m
我们使用Gulp (刚刚从ng-cli迁移而来)来构建我们的2项目,在这里我使用燃料ui。
我有个奇怪的错误。我在我们的一个组件中使用燃料ui的警报组件。如果我们在system.config.js中引用节点_模块/燃料-ui文件夹中的燃料-ui,那么一切都很好。如果我从构建/供应商/燃料-ui引用它,它会失败,并出现以下错误:
EXCEPTION: Unexpected directive value 'undefined' on the View of component 'MyAlertComponent'
platform-browser.umd.
我开始用AngularJS v1.4.0测试新的ui路由器v1.0.0alpha 0,但是我得到了这个错误:
TypeError: Cannot read property 'creationContext' of undefined
at http://localhost:1828/lib/angular-ui-router/release/angular-ui-router.js:1573:65
at curried (http://localhost:1828/lib/angular-ui-router/release/angular-ui-router.
我有一个棱角分明的应用程序,并试图添加一个简单的谷歌地图到一个页面。但我明白了:
> Google Maps API is required. Please register the following JavaScript
> library http://maps.google.com/maps/api/js?sensor=true. <div
> data-ui-view="" class="ng-scope">(anonymous function) @
> angular.js:11598$get @ angular
我尝试在我的角度项目中导入jquery -旋钮插件,所以我通过npm安装了jquery--它工作得很好。现在我想添加jquery-旋钮(也通过npm),但是我得到了这个错误,我认为它在
jquery.knob.min.js
Uncaught ReferenceError: jQuery is not defined
at eval (eval at webpackJsonp.310.module.exports (addScript.js:9), <anonymous>:1:85)
at eval (eval at webpackJsonp.310.modu
我已经托管了我的示例应用程序,我正在尝试将MainCtrl变量访问到指令“链接”函数中,但是得到了以下错误。
angular.js:14700 ReferenceError: testMessage is not defined
at Object.link (TestDirective.js:12)
at angular.js:1385
at invokeLinkFn (angular.js:10545)
at nodeLinkFn (angular.js:9934)
at angular.js:10273
at processQueue (a
我正在尝试打开对话框。当我按下一个按钮,但出现以下错误时:
ERROR Error: StaticInjectorError(AppModule)[UsertableComponent -> MatDialog]:
StaticInjectorError(Platform: core)[UsertableComponent -> MatDialog]:
NullInjectorError: No provider for MatDialog!
at _NullInjector.get (core.js:994)
at
升级到角11后,我再也不能ng serve我的web应用程序了。
我正在使用Spring和最新的OpenAPI生成器gradle-plutin (5.0.0)生成客户机。
这个问题似乎与我的(生成)REST客户端有关。打开将将以下内容写入控制台:
main.ts:12 Error: inject() must be called from an injection context
at injectInjectorOnly (core.js:4901) [angular]
at Module.ɵɵinject (core.js:4911) [angular]
at Ob
请在这里找到小提琴,
这是我想要做的事情的简化形式。有两个指令,一个是嵌套的subDirective,它根据选择(随机)动态创建html表单。如果您重复单击该按钮,则它将抛出错误下面。
TypeError: Cannot call method 'insertBefore' of null
at https://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js:138:283
at q (https://ajax.googleapis.com/ajax/libs/angularjs/1.2
我是Angular JS的新手,试图在另一个控制器中调用一个控制器,但遇到了下面的错误。
ionic.bundle.js:21157 TypeError: $controller is not a function
at new <anonymous> (http://localhost:8080/itravel/www/js/controllers.js:6:2)
at invoke (http://localhost:8080/itravel/www/lib/ionic/js/ionic.bundle.js:13277:17)
at Object.instantiate (ht
编辑:我已经发现了造成问题的原因;我现在正在寻找一个解决方案来解决这个问题。
注意:此问题发生在dev模式下(即不是prod,也不是使用aot)。
我在这里使用“更新”解决方案:
若要解决未更新窗体上的有效标志的子组件中的输入问题,请执行以下操作。它在一个相当简单的测试项目中工作,但是当将它移到我们的实际项目时,它会抛出以下错误:
core.es5.js:1020 ERROR Error: Uncaught (in promise): Error: No provider for NgForm!
Error: No provider for NgForm!
at ZoneAwareE