Всем привет!
Подключил такую библиотеку как angucomplete.js
Но выдается ошибка.
Unknown provider: $sceProvider <- $sce <- angucompleteDirective
Не могу понять в чем проблема(
Вот код
<script type='text/javascript' src='libs/angular.min.js'></script>
<script type='text/javascript' src='js/app.js'></script>
<script type='text/javascript' src='js/controllers.js'></script>
<script type='text/javascript' src='js/sortable.js'></script>
<script type='text/javascript' src='libs/jtruncate.js'></script>
<script type='text/javascript' src='libs/angucomplete.js'></script>
<div class="block_search" id="blockSearch" ng-controller="Search">
<angucomplete id="searchCatalog" placeholder="Поиск по каталогу сервисов" pause="100" url="/services-catalog/api/index.php?action=catalogSearch" minlength="3" inputclass="search_input"/>
<a href="javascript:void(0);" id="searchMagnifier" class="magnifier"></a>
<!--<input type="search" class="search_input" id="searchCatalog" placeholder="Поиск по каталогу сервисов">-->
<a href="javascript:void(0);" ng-click="clear()" id="searchClear" class="search_clear"></a>
<span class="search_example">Например, <i>такси, визитки...</i></span>
<div class="clear"></div>
</div>
var servicesCatalog = angular.module('servicesCatalog', [
'catalogControllers',
'ui.sortable',
'angucomplete'
]);
servicesCatalog.run(function($rootScope, $http, $location, $route) {
$rootScope.ajax = false;
$rootScope.load_catalog = true;
var original = $location.path;
$location.path = function (path, reload) {
if (reload === false) {
var lastRoute = $route.current;
var un = $rootScope.$on('$locationChangeSuccess', function () {
$route.current = lastRoute;
un();
});
}
return original.apply($location, [path]);
};
});
catalogControllers.controller('Search', ['$scope', '$routeParams', '$http',
function($scope, $routeParams, $http, loader) {
}]);