ngHint plugin cannot be run as ngHint code was never included into the page

对着背影说爱祢 提交于 2019-12-08 02:29:37

问题


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.

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.


回答1:


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.

In other words, your angular application should have ngHint.js loaded.

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).



来源:https://stackoverflow.com/questions/30513132/nghint-plugin-cannot-be-run-as-nghint-code-was-never-included-into-the-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!