Hi guys i want to show and hide div on modal-popup in angularjs(bootstrap3.3) following is the code i have written , on page load the required myModal_username1is displayed but on click of submit when the controller function is called the myModal_username1 is supposed to be visiblely false and other div should be visibly true.. but same is not happeing.
Controller Code:
angular.module('ratefastApp')
.controller('LoginCtrl', function ($scope, Auth, $location) {
$scope.showUser = 'true';
$scope.x= function(form) {
$scope.showPass = 'false';
}}
view :
<div class="modal fade" id="myModal_username" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Forgot your Username ?</h4>
</div>
<!-- div check -->
<div ng-show="showUser" id="myModal_username1" class="modal-body"
ng-include src="'views/partials/forgotstage_username.html'">
</div>
<!-- div question -->
<div ng-hide="showUser" id="myModal_username2" class="modal-body"
ng-include src="'views/partials/forgot_username.html'">
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->