I want to keep the state of my bootstrap.ui (OR ngdialog !!) modal window when it is closed. Any idea how I can ng-show / ng-hide a modal window?
Thanks.
Check out this example:
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css"> <div ng-app> <div ng-init="showModal=false"> <button class="btn btn-primary btn-lg" ng-click="showModal = !showModal"> Launch demo modal </button> <div class="modal fade in" aria-hidden="false" style="display: block;" ng-show="showModal"> <div class="modal-dialog"> <div class="modal-content"> MODAL <div class="modal-footer"> <button type="button" class="btn btn-primary" ng-click="showModal=false">Ok</button> </div> </div> </div> </div> </div> </div>
Source: https://habr.com/ru/post/1235210/More articles:Xamarin Warning: AppIcons app icon set has 2 unassigned children - iosProblems with protractor + Java. (AngularJS) - javafunction pointer assignment and call in C ++? - c ++VisualVM crashes: "EXCEPTION_ACCESS_VIOLATION" - java-7Gradle shadow plugin packages are also all the “provided” dependencies that should not be in this case - gradleVisualVM breaks marina - javaiOS disable push segue animation - iosIs it possible to use the framework with akka http (and not the one in the game) and disable the network server? - scalaWhat is a browser variable in nightwatchjs - nightwatch.jsHow to create migration based on flyway java - javaAll Articles