Closed zzal closed 10 years ago
Hi,
Since some options are set within link function, they are not dynamic. 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 typeahead directive.
$scope.isAtLeastAdmin
So what I suggest is to not set theses options in private variables. I can attempt what I'm trying if I change line #3170:
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!
I'll post that in the original Github repo… I'm sorry.
Hi,
Since some options are set within link function, they are not dynamic. For instance, if I set a property:
or:
The changes in the result of the
$scope.isAtLeastAdmin
function are never passed to the typeahead 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 #3170:
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!