In my Angular code, I have the following:
<span ng-mouseover="item.show_description=true" ng-mouseleave="item.show_description=false" pointer="{x: item.x, y: item.y}">
{{item.label}}
</span>
<div class="description-popup" ng-show="!!item.description && item.show_description"
style="left: {{item.x}}px; top: {{item.y}}px">
<h2>{{item.label}}</h2>
<p>{{item.description}}</p>
<p>{{!!item.description && item.show_description}}</p>
</div>
The popup appears correctly, but even when the description is null or an empty string, the popup still shows up. In that case, the last expression shows false. Am I doing something wrong here? Or could it be a bug? I am using Angular 1.0.6 and cannot upgrade at the moment.
UPDATE:
I created a JSFiddle, and it seems like ng-show works as expected, except when I use the pointer directive that utilizes the mousemove event. The directive code is as follows:
app.directive('pointer', function($parse) {
// Directive code omitted for clarity
});