Show permanently "ng-show" when the app is closed by the user


#1

Hi , is it possible to show permanently “ng-show” when the app closed?


#2

sry, i do not get it… maybe you can explain it a little bit better


#3

Here’s a further explanation: When I Click the button the div ng-show , I want to show It Permanently It will no longer Hide.

<button ng-click="showTheDIV">Click Me To Show the DIV </button>

<div ng-show="ShowMeNow">
         <h2>I will show Permanently</h2>
</div>

#4

Create $scope.showMeNow = false; in your controller and :

<button ng-click="showMeNow = true">Click Me To Show the DIV </button>

<div ng-show="showMeNow">
     <h2>I will show Permanently</h2>
</div>

???


#5

here’s the full code:When I Click the button the div ng-show ,When my app is close, I want to show the “DIV ng-show” Permanently It will no longer Hide. Am I going to use localstorage or ngstorage to save it ?

   <button ng-click="showTheDIV">Click Me To Show the DIV </button>
    
    <div ng-show="ShowMeNow">
             <h2>I will show Permanently</h2>
    </div>
    
//Heres My Controller
    .controller('MainCtrl',function($scope){
    
    $scope.showTheDIV = function(){
        $scope.ShowMeNow = True;
    }
    
    })

#6

Please help :frowning: