Q:

AngularJs code for show/hide div's

Here my two div's are as follows:
<div class="login">
UserName:<input type="text" name="uname"><br>
Password:<input type="password" name="pwd"><br>
<input type="submit" value="login"><br>
<a href="#" id="register">SignUp for new User</a>

</div>
<div class="signUp">
FirstName:<input type="text" name="fname"><br>
Lastname:<input type="text" name="lname"><br>
Password:<input type="password" name="pwd"><br>
<button>SignUp</button>

</div>

And my script in jQuery as follows:
 $(document).ready(function()
  {  
  $(".signUp").hide();
     $("#register").click(function() {
        $(".signUp").show();
        $(".login").hide();
     });  
   });  

I want the same functionality using angularjs. Can anyone help me out..

A:

Google ng-show and ng-hide.  Basically you want to create a variable in your model that represents whether these are shown.  ng-show/hide bind to this variable and automatically take care of the div's visibility when the variable's value changes.  Also, look at the ng-click tag for your register button.

