0
我知道,我問前兩天同樣的問題:( autocomplete in angular with typehead輸入:自動完成與angularstrap
當我只是複製了它的工作井plunker的例子,但知道我安裝了全angularstrap和希望。結合我自己的消息來源所以現在它是不工作
<div data-ng-controller="ConnectionController">
<input type="text" class="form-control" ng-model="selectedState"
bs-options="state for state in states" placeholder="Enter state" bs-typeahead>
</div>
我的應用程序:
var myApp = angular.module("myApp", ['ngRoute', 'ngSanitize','mgcrea.ngStrap']);
腳本我勢必_layout.cshtml
<script src="~/Scripts/angular.min.js"></script>
<script src="~/Scripts/angular-animate.min.js"></script>
<script src="~/Scripts/angular-sanitize.min.js"></script>
<script src="~/Scripts/angular-strap.min.js"></script>
<script src="~/Scripts/angular-strap.tpl.min.js"></script>
不,我得到這個錯誤:
Uncaught Error: [$injector:unpr] http://errors.angularjs.org/undefined/$injector/unpr?p0=%24%24sanitizeUriPr…%24sceDelegate%20%3C-%20%24sce%20%3C-%20%24interpolate%20%3C-%20%24compile(anonymous function) @ MINERR_ASSET:22(anonymous function) @ angular.js:3444c @ angular.js:3571(anonymous function) @ angular.js:3449c @ angular.js:3571d @ angular.js:3593(anonymous function) @ angular.js:3450c @ angular.js:3571$get @ angular.js:12061d @ angular.js:3617(anonymous function) @ angular.js:3450c @ angular.js:3571d @ angular.js:3593(anonymous function) @ angular.js:3450c @ angular.js:3571d @ angular.js:3593(anonymous function) @ angular.js:3450c @ angular.js:3571d @ angular.js:3593(anonymous function) @ angular.js:3450c @ angular.js:3571d @ angular.js:3593Wb.c @ angular.js:1283Wb @ angular.js:1297Oc @ angular.js:1246(anonymous function) @ angular.js:20026a @ angular.js:2291(anonymous function) @ angular.js:2555q @ angular.js:300Uc.c @ angular.js:2554
angular.js:78
Uncaught Error: [$injector:unpr] Unknown provider: $$sanitizeUriProvider <- $$sanitizeUri <- $sanitize <- $sceDelegate <- $sce <- $interpolate <- $compile
http://errors.angularjs.org/1.2.0/ $噴油器/ unpr P0 =%24%24sanitizeUriProvid ...%24sceDelegate%20% 3C-%20%24%20%3C-%20%24插值%20%3C-%20%24compile
請問您確認'angular.js'&'angular-sanitize.js'版本是否一樣? –
確定版本不一樣。我從visual studio中的nuget-paket-manager安裝它。我有更老的。 – trap
因此,使他們相同的版本.. –