Skip to content
This repository has been archived by the owner on Aug 24, 2017. It is now read-only.

Typeahead options not being respected #16

Open
ravinggenius opened this issue Oct 18, 2013 · 3 comments
Open

Typeahead options not being respected #16

ravinggenius opened this issue Oct 18, 2013 · 3 comments
Assignees
Milestone

Comments

@ravinggenius
Copy link

I verified the templateUrl option by manually visiting http://localhost:9000/bower_components/bootstrap/template/typeahead/typeahead-popup.html. I also verified scope.typeaheadOptions in https://github.com/decipherinc/angular-tags/blob/0.2.10/dist/angular-tags-0.2.10.js#L585 is being set correctly. Why isn't angular-tags requesting the right template? Did I configure it wrong?

In my controller:

$scope.document = new Document();
$scope.typeaheadOpts = {
  templateUrl: 'bower_components/bootstrap/template/typeahead/typeahead-popup.html'
};

In my view:

<tags data-options="{addable: true}" typeahead-options="typeaheadOpts" data-model="document.tags"></tags>

In my browser's console (when visiting http://localhost:9000/#/library):

GET http://localhost:9000/template/typeahead/typeahead-popup.html 404 (Not Found) angular.js:9499
Error: Failed to load template: template/typeahead/typeahead-popup.html
    at Error (<anonymous>)
    at http://localhost:9000/bower_components/angular/angular.js:4725:17
    at http://localhost:9000/bower_components/angular/angular.js:9144:11
    at deferred.promise.then.wrappedErrback (http://localhost:9000/bower_components/angular/angular.js:7004:57)
    at http://localhost:9000/bower_components/angular/angular.js:7080:53
    at Object.$get.Scope.$eval (http://localhost:9000/bower_components/angular/angular.js:8218:28)
    at Object.$get.Scope.$digest (http://localhost:9000/bower_components/angular/angular.js:8077:25)
    at Object.ng.config.$provide.decorator.$delegate.__proto__.$digest (<anonymous>:844:31)
    at Object.$get.Scope.$apply (http://localhost:9000/bower_components/angular/angular.js:8304:24)
    at Object.ng.config.$provide.decorator.$delegate.__proto__.$apply (<anonymous>:855:30)
This was referenced Oct 18, 2013
@boneskull
Copy link
Owner

Will check this out. @ravinggenius Can you assert that the typeahead directive itself works with your templateURL?

@ravinggenius
Copy link
Author

I tried using Bootstrap's typeahead directive directly, and the [typeahead-template-url] attribute seems to be ignored. I had to copy the template files from app/bower_components/bootstrap/template to app/template to get it to work.

In my view:

<input type="text" ng-model="state" typeahead="state for state in states" typeahead-template-url="bower_components/bootstrap/template/typeahead/typeahead-popup.html" />

@jojoyuji
Copy link

jojoyuji commented Apr 4, 2014

same here

@boneskull boneskull added this to the v1.0.0 milestone May 16, 2014
@boneskull boneskull self-assigned this May 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants