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.
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');
}