Announcement

Collapse
No announcement yet.

Autocomplete mit typehead

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autocomplete mit typehead

    Hallo,

    ich bins wieder

    Ich versuche gerade ein Autocomplete zu machen.

    HTML Code:
    <html ng-app="test">
    <head>
        <script src="http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js" data-semver="1.4.5"></script>
    
        <script src="http://mgcrea.github.io/angular-strap/dist/angular-strap.js" data-semver="v2.3.2"></script>
        <script src="http://mgcrea.github.io/angular-strap/dist/angular-strap.tpl.js" data-semver="v2.3.2"></script>
        <script src="http://mgcrea.github.io/angular-strap/docs/angular-strap.docs.tpl.js" data-semver="v2.3.2"></script>
    </head>
    <body ng-controller="MainCtrl">
        <input type="text" class="form-control" ng-model="input"
               bs-options="name for name in names" bs-typeahead>
    
        <script>
            var app = angular.module('test', ['mgcrea.ngStrap']);
    
            app.controller('MainCtrl', function ($scope) {
                $scope.names = ["München", "Augsburg"];
            });
    
        </script>
    </body>
    </html>
    kriege aber leider folgenden Fehler:

    Code:
    Error: [$injector:unpr] http://errors.angularjs.org/1.4.5/$injector/unpr?p0=%24%24rAFProvider%20%3C…ip%20%3C-%20%24typeahead%20%3C-%20bsTypeaheadDirective%20%3C-%20%24tooltip
        at Error (native)
        at http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:6:416
        at http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:40:307
        at Object.d [as get] (http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:38:308)
        at http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:40:381
        at d (http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:38:308)
        at Object.e [as invoke] (http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:39:64)
        at http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:40:410
        at d (http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:38:308)
        at Object.e [as invoke] (http://cdn.jsdelivr.net/angularjs/1.4.5/angular.min.js:39:64)(anonymous function) @ angular.js:9037(anonymous function) @ angular.js:6648(anonymous function) @ angular.js:5119forEach @ angular.js:300(anonymous function) @ angular.js:5104e @ angular.js:4473(anonymous function) @ angular.js:4325e @ angular.js:4473(anonymous function) @ angular.js:4290d @ angular.js:4432addDirective @ angular.js:6123collectDirectives @ angular.js:5584compileNodes @ angular.js:5459compileNodes @ angular.js:5471compileNodes @ angular.js:5471compileNodes @ angular.js:5471compile @ angular.js:5402(anonymous function) @ angular.js:1660Scope.$eval @ angular.js:11528Scope.$apply @ angular.js:11628(anonymous function) @ angular.js:1658e @ angular.js:4473d @ angular.js:1656yc @ angular.js:1676Zd @ angular.js:1570(anonymous function) @ angular.js:28683a @ angular.js:3018Hf.c @ angular.js:3293
    angular.js:78 Uncaught Error: [$injector:modulerr] Failed to instantiate module test due to:
    Error: [$injector:modulerr] Failed to instantiate module mgcrea.ngStrap due to:
    Error: [$injector:modulerr] Failed to instantiate module mgcrea.ngStrap.modal due to:
    Error: [$injector:unpr] Unknown provider: $compileProvider
    http://errors.angularjs.org/1.2.0/$injector/unpr?p0=%24compileProvider
        at http://localhost/444/Scripts/angular.js:78:12
        at http://localhost/444/Scripts/angular.js:3444:19
        at Object.getService [as get] (http://localhost/444/Scripts/angular.js:3571:39)
        at http://localhost/444/Scripts/angular.js:3525:45
        at Array.forEach (native)
        at forEach (http://localhost/444/Scripts/angular.js:300:11)
        at loadModules (http://localhost/444/Scripts/angular.js:3514:5)
        at http://localhost/444/Scripts/angular.js:3521:40
        at Array.forEach (native)
        at forEach (http://localhost/444/Scripts/angular.js:300:11)
    http://errors.angularjs.org/1.2.0/$injector/modulerr?p0=mgcrea.ngStrap.moda…0forEach%20(http%3A%2F%2Flocalhost%2F444%2FScripts%2Fangular.js%3A300%3A11)
        at http://localhost/444/Scripts/angular.js:78:12
        at http://localhost/444/Scripts/angular.js:3548:15
        at Array.forEach (native)
        at forEach (http://localhost/444/Scripts/angular.js:300:11)
        at loadModules (http://localhost/444/Scripts/angular.js:3514:5)
        at http://localhost/444/Scripts/angular.js:3521:40
        at Array.forEach (native)
        at forEach (http://localhost/444/Scripts/angular.js:300:11)
        at loadModules (http://localhost/444/Scripts/angular.js:3514:5)
        at http://localhost/444/Scripts/angular.js:3521:40
    http://errors.angularjs.org/1.2.0/$injector/modulerr?p0=mgcrea.ngStrap&p1=E…%20%20at%20http%3A%2F%2Flocalhost%2F444%2FScripts%2Fangular.js%3A3521%3A40
        at http://localhost/444/Scripts/angular.js:78:12
        at http://localhost/444/Scripts/angular.js:3548:15
        at Array.forEach (native)
        at forEach (http://localhost/444/Scripts/angular.js:300:11)
        at loadModules (http://localhost/444/Scripts/angular.js:3514:5)
        at http://localhost/444/Scripts/angular.js:3521:40
        at Array.forEach (native)
        at forEach (http://localhost/444/Scripts/angular.js:300:11)
        at loadModules (http://localhost/444/Scripts/angular.js:3514:5)
        at createInjector (http://localhost/444/Scripts/angular.js:3454:11)
    http://errors.angularjs.org/1.2.0/$injector/modulerr?p0=test&p1=Error%3A%20…njector%20(http%3A%2F%2Flocalhost%2F444%2FScripts%2Fangular.js%3A3454%3A11)
    Ich habe es eigentlich genauso gemacht wie in diesem Beispiel: http://plnkr.co/edit/IwvFz2EHbsI7BBoxGqwH?p=preview

    aber ich verstehe einfach nicht was ich falsch mache


    gruß, trap
Working...
X