【问题标题】:ngHint plugin cannot be run as ngHint code was never included into the pagengHint 插件无法运行,因为 ngHint 代码从未包含在页面中
【发布时间】:2015-05-28 17:19:58
【问题描述】:

我最近更新了一个 AngularJS 项目以使用 Protractor 2.x,并希望利用它附带的新嵌入插件。我能够毫无问题地激活时间线、控制台和辅助功能插件,但在尝试使用 ngHint 插件时,我不断收到以下错误。

需要做什么才能将 ngHint 代码包含到页面中以便它可以运行? Protractor 插件文档除了在 conf.js 文件中列出插件之外没有指定做任何事情。

【问题讨论】:

    标签: javascript angularjs plugins protractor angularjs-ng-hint


    【解决方案1】:

    根据source code of the plugin,只能说明一件事:angular.hint没有定义,也就是说没有安装angular-hint。

    换句话说,您的 Angular 应用程序应该已加载 ngHint.js

    作为示例和演示,请参阅量角器internal tests of the error message。它使用 noNgHint.html 抛出错误消息,但适用于 index.html(请参阅加载了 angular-hint js)。

    【讨论】:

    • 谢谢@alecxe。我看看能不能解决。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-27
    相关资源
    最近更新 更多