Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

element.typeahead is undefined #2

Open
sn0opr opened this issue Jul 25, 2016 · 1 comment
Open

element.typeahead is undefined #2

sn0opr opened this issue Jul 25, 2016 · 1 comment

Comments

@sn0opr
Copy link

sn0opr commented Jul 25, 2016

This is the first time I use this module, and I got this error:

angular.min.js:117TypeError: element.typeahead is not a function
    at initialize (http://cours-apostrophe.dev/vendor/js/angular-bootstrap3-typeahead.js:79:28)
    at prepare (http://cours-apostrophe.dev/vendor/js/angular-bootstrap3-typeahead.js:101:11)
    at link (http://cours-apostrophe.dev/vendor/js/angular-bootstrap3-typeahead.js:105:7)
    at ja (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:80:350)
    at n (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:66:28)
    at g (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:58:305)
    at g (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:58:322)
    at g (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:58:322)
    at g (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:58:322)
    at n (http://cours-apostrophe.dev/vendor/js/angular/angular.min.js:65:473) <input type="text" name="matiere" placeholder="Que voulez-vous apprendre" bs3-typeahead="" bs3-source="states" ng-model="matiere" class="ng-pristine ng-untouched ng-valid">

I included the bootstrap3-typeahead.js, then angular-bootstrap3-typeahead.js in my HTML code.
I added binded the element link parameter of the directive to a jquery object, and everythings works fine 👍

link: function link(scope, element, attrs, controller) {
      element = $(element);
      ......
@danielcb29
Copy link

danielcb29 commented Feb 22, 2017

Hi, same problem, solved included in order:

"bower_components/bootstrap3-typeahead/bootstrap3-typeahead.js"
"bower_components/angular-bootstrap3-typeahead/angular-bootstrap3-typeahead.js"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants