![](/img/trans.png)
[英]How do you update your project to use the latest version of javascript?
[英]How do you import ngTagsInput into your project with AngularJS and Bootstrap?
在嘗試使用 ngTagsInput 時如何防止出現此消息? 我試圖轉到模塊並輸入:
var app = angular.module("SinglePageApplication", [ "ngRoute", 'ui.bootstrap', 'ngTagsInput']);
但是,這總是在下面引發以下錯誤。
Uncaught Error: [$injector:modulerr] Failed to instantiate module SinglePageApplication due to:
Error: [$injector:modulerr] Failed to instantiate module ngTagsInput due to:
Error: [$injector:nomod] Module 'ngTagsInput' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.5.8/$injector/nomod?p0=ngTagsInput
此外,我嘗試安裝它,使用此鏈接並調用命令:
$ npm install ng-tags-input@3.1.1 --save
但這總是拋出錯誤:
UNMET PEER DEPENDENCY grunt@1.0.1
└── ng-tags-input@3.1.1
我想要的只是能夠使用標簽輸入,但是我覺得我缺少一些主要的東西來解決所有這些問題。 我真的很感激任何幫助。
我記得遇到了這個問題,我想出的修復/解決方法是在本地復制ng-tags-input.js
並將其保存在 .git 中。
我完全忘記檢查這個,當時任何 Angular >= 1.5 都有一個錯誤。 無法准確回憶該錯誤,但我認為我的問題是在按 Enter 鍵時,它會從下拉列表中選擇一項而不是提交輸入。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.