java - How to prevent showing hidden buttons on reload? -


i have code hide button in angularjs, looks this:

indexstud.html

<button ng-show="show" ng-click="initstud(); btnshow()">init tables</button> 

controllers.js

    $scope.show=true;     $scope.btnshow=function(){         $scope.show=!$scope.show;     } 

now, added refresh button page indexstud.html

<input type="button" value="refresh page" onclick="window.location.reload()"> 

it works this:

i press init tables button, fills tables , disappears, , then, see content in tables, need refresh page... press on button refresh, , content in tables shows up...

but, init tables button visible again...but want hidden forever once clicked...

how that?

my table looks this:

    <table>         <tbody>             <tr>                 <td>id</td>                 <td>first name</td>                 <td>last name</td>             </tr>              <tr ng-repeat="student in result"                 ng-class="{'selected':$index == selectedrow}"                 ng-click="setselected(student,$index)">                 <td>{{ student.id }}</td>                 <td>{{ student.firstname }}</td>                 <td>{{ student.lastname }}</td>              </tr>          </tbody>     </table> 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -