This repository was archived by the owner on May 29, 2019. It is now read-only.
This repository was archived by the owner on May 29, 2019. It is now read-only.
typeahead directive's properties can't be dynamic #1533
Closed
Description
Hi,
Since some options are set private within the link function of the typeahead directive, they are not binded.
For instance, if I set a property:
typeahead-editable="isAtLeastAdmin()"
or:
typeahead-editable="{{ isAtLeastAdmin() }}"
The changes in the result of the $scope.isAtLeastAdmin
function are never passed to the directive.
So what I suggest is to not set theses options in private variables.
I can attempt what I'm trying if I change line 169 of src/typeahead/typeahead.js
:
if (originalScope.$eval(attrs.typeaheadEditable) !== false) {
return inputValue;
} else {
and use it like this: typeahead-editable="isAtLeastAdmin()"
Maybe I should make a pull request, or someone have an idea for a better implementation?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels