angularjs - Uncaught Error: Unknown provider: $templateRequestProvider <- $templateRequest <- $modal -


hello stackoverflowers ;)

i struggle bit of time on particular problem concerning bootstrap.ui modal:

uncaught error: unknown provider: $templaterequestprovider <- $templaterequest <- $modal

i tried define provider can't work properly.

this app.js:

var app = angular.module('stelping', ['ui.bootstrap']). config(['$routeprovider', function ($routeprovider) {     $routeprovider.         when('/', {             templateurl: 'pages/home.html',             controller: homectrl,             activetab: 'home'         }).         when('/notentool', {             templateurl: 'pages/notentool.html',             controller: notentoolctrl,             activetab: 'notentool'         }).         when('/lerngruppe', {             templateurl: 'pages/lerngruppe.html',             controller: lerngruppenctrl,             activetab: 'lerngruppe'         }).         when('/raumreservierung', {             templateurl: 'pages/raumreservierung.html',             controller: raumreservierungctrl,             activetab: 'raumreservierung'         }).         when('a', function() {             return {                 restrict: 'e',                 link: function(scope, elem, attrs) {                     if(attrs.ngclick || attrs.href === '' || attrs.href === '#'){                         elem.on('click', function(e){                             e.preventdefault();                         });                     }             }         }}).         when('/registrieren', {             templateurl: 'pages/registrieren.html',             controller: registrierungsctrl,             activetab: 'registrieren'         }).         otherwise({ redirectto: '/' }); }]).run(['$rootscope', '$modal', '$log', '$http', '$browser', '$timeout', "$route", function ($scope, $modal, $log, $http, $browser, $timeout, $route) {      $scope.$on("$routechangesuccess", function (scope, next, current) {         $scope.part = $route.current.activetab;     });   }]);  app.config(['$locationprovider', function($location) {     $location.hashprefix('!'); }]); 

and controller.js (partially 2 new ctrls):

function lerngruppenctrl($scope, $modal, $log) { $scope.buildings = [ 1, 5, 6 ]; $scope.rooms = [ 0, 1, 2, 3, 4 ]; $scope.currentbuilding = 1; $scope.currentroom = 0; $scope.setroom = function(room) {     $scope.currentroom = room; } $scope.setbuilding = function(building) {     $scope.currentbuilding = building; } $scope.imgchanger = function() {     return $scope.currentbuilding+"_"+$scope.currentroom; }; $scope.class = "hidden";  $scope.open = function (size) {      var modalinstance = $modal.open({         templateurl: 'mymodalcontent.html',         controller: 'modalinstancectrl',         size: size     });     modalinstance.result.then(function () {         $log.info('modal dismissed at: ' + new date());     }); }; }  function modalinstancectrl($scope, $modalinstance) {     $scope.cancel = function () {         $modalinstance.dismiss('cancel');     }; } 

that error due mismatch between versions of ui.bootstrap , angular. ui.bootstrap .13 depends on 1.3x, .12 depended on 1.2x.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -