I have a couple of containers that show text based on a scope property:
<style>
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak{
display: none !important;
}
</style>
<a ng-hide="show===false" ng-cloak>item 1</a>
<a ng-hide="show===true" ng-cloak>item 2</a>
<span ng-click="toggle()">toggle</span>
//js
var app = angular.module('appy', []);
app.controller('ctrl', function($scope){
$scope.show = false;
$scope.toggle = function(){
$scope.show = !$scope.show;
};
});
https://jsbin.com/numaxiroka/edit?html,js,output
This simple example works in the JSBIN, but on my page the content "item 1" and "item 2" both flash momentarily on the screen. What could I be doing incorrectly that would make both elements appear briefly?
I've been using this for reference.