Box is shown for a sec even though show_box = false?

Hi All,

I have a view with two hidden message boxes, and a controller which defines two variables and sets them to false, representing the visibility of the boxes. The problem is that when I open this view from the menu, both boxes are visible for around 1 second, before disappering?


app.controller('SettingsUpdateController', function($scope, $ionicPopup, $timeout, $http) {

$scope.show_message_box   = false;
$scope.show_error_message = false;

... Some other stuff..


 <ion-view view-title="Opdatering" style="color:black">
 <ion-content ">

	<div class="green-message-box" ng-show="show_message_box" ng-click="show_message_box = false">

	<div class="red-message-box" ng-show="show_error_message" ng-click="show_error_message = false">

   ... Some other stuff.... 


Hi Texton! i think, your problem is with javascript! i try to create another $scope and set it true when you want so show the 1° box and false for the 2° box, and than put your new scope inside of your ng-show! like that you have 2 variables to satisfy!