I would like to be able to set ng-show off a variable I set on the scope variable within the link function of an Angular customer directive.
angular.module('myApp')
.directive('testDir', function () {
return {
template: <div ng-show="{{showme}}"> hello </div>,
link: function (scope, element, attrs) { //
scope.showme=true;
}
});
Unfortunately, when I do this it doesn't work as expected. If I set scope.showme=true, then my directive is hidden. If I set it =false then it is shown. How am I screwing this up?