ngHint插件不能运行为ngHint code从未被纳入页 [英] ngHint plugin cannot be run as ngHint code was never included into the page
问题描述
我最近更新了AngularJS项目使用量角器2.x和想采取与它一起到来的新的嵌入式插件的优势。我能激活时间表,控制台和没有问题的无障碍插件,但我不断收到试图使用ngHint插件时,下面的错误。
I've recently updated an AngularJS project to use Protractor 2.x and wanted to take advantage of the newly embedded plugins that come along with it. I was able to activate the timeline, console, and accessibility plugins without issue, but I keep getting the below error when trying to use the ngHint plugin.
需要做的事情,以包括ngHint code到一个页面,以便它可以运行什么?量角器插件文档不指定做任何事情,除了在conf.js文件列表插件。
What needs to be done to include the ngHint code into a page so it can run? The Protractor plugin documentation doesn't specify to do anything besides listing the plugin in the conf.js file.
推荐答案
据该的插件来源$ C $ C,它只能意味着一件事: angular.hint
没有定义,这意味着角-hint未安装。
According to the source code of the plugin, it can only mean one thing: angular.hint
is not defined, which means angular-hint is not installed.
在换句话说,你的应用程序的角度应该有 ngHint.js
加载。
In other words, your angular application should have ngHint.js
loaded.
作为一个例子,演示,看到量角器<一个href=\"https://github.com/angular/protractor/blob/45341c944bf60537849776c7f362ee0442b219e6/scripts/test.js#L121\"相对=nofollow>错误消息的内部测试。它抛出与 noNgHint.html 中的错误信息,但与的index.html 工作(见有angular-提示JS加载)。
As an example and a demo, see protractor internal tests of the error message. It throws the error message with noNgHint.html, but works with index.html (see there is angular-hint js loaded).
这篇关于ngHint插件不能运行为ngHint code从未被纳入页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!