0

I want to display two forms. 1: Login Form 2. Register Form

First time show Login Form, on click of "create an account", I want to show Register Form and hind the Login Form and vice versa. I did this using Jquery.

$('form').animate({ height: 'toggle', opacity: 'toggle' }, 'slow');

But I'm looking to do this using Angular animation module.

enter image description here

I'm using Angular 5.

Sample:

   <form class="login">
    <button (click)="toggleForm()">Create Account</button>
  </form>
  <form class="register">
    <button (click)="toggleForm()">Sign In</button>
  </form>

toggleForm() {
    $('form').animate({ height: 'toggle', opacity: 'toggle' }, 'slow');
 }

1 Answers1

0

Well, not very beautiful or anything, but to point you into a direction you might go with toggeling your forms using angular animations: example

Fussel
  • 1,740
  • 1
  • 8
  • 27