I have HTML code block that I need to control the visibility of using an Angular variable
<div class={{visibilityCss}}>
Show/Hide Area
</div>
In Angular, I can set $scope.visibilityCss = 'hide'
or $scope.visibilityCss = 'show'
, with 'hide'
as the default. I also have CSS classes for toggling visibility: .show/.hide
which apply display:block/none.
I want this div
to be hidden by default, but currently it is initially visible when the page loads and only hides after approximately 1 second (when Angular JS is loaded). I would like it to be invisible from the start. (similar to applying a hidden CSS property for .{{visibilityCss}}
if it were a valid class name)