For anyone interested, after digging through the source code, I discovered an attribute on directive bsDropdown
called bsShow
with the following implementation.
// Visibility binding support
attr.bsShow && scope.$watch(attr.bsShow, function(newValue, oldValue) {
if(!dropdown || !angular.isDefined(newValue)) return;
if(angular.isString(newValue)) newValue = !!newValue.match(/true|,?(dropdown),?/i);
newValue === true ? dropdown.show() : dropdown.hide();
});
This essentially drives the dropdown markup to include this and bind to a $scope
value as such
<textarea id="textdrop" ng-model="expression" intellisense bs-dropdown="dropdown" bs-show="drop"></textarea>
Then within my directive I can trigger visibility by modifying $scope.drop
as bound on bs-show="drop"
app.directive('intellisense', [function () {
return {
restrict: 'A',
link: function (scope, elem, attrs) {
scope.$watch(attrs.ngModel, function (v) {
if(v) {
scope.drop = true; // simple - but works
} else {
scope.drop = false;
}
});
}
}
}]);
It appears this was documented on a project commit as referenced here. The official documentation still makes no mention of this as the time of writing, and given the timeline of this I am surprised the lack of attention this has received.
Plunker Link with trigger: manual