Using Angular Animations, and it was working fine for a long while, and now it's just stopped. No errors, just not firing.
I've defined the transitions and states like so:
@Component({
animations: [
trigger('form2Head',[
state('hidden', style({
transform: 'translateY(-85%)'
})),
state('shown', style({
transform: 'translateY(0)',
})),
transition('hidden <=> shown', animate('300ms ease-in')),
]),
],
and defined the animation binding in my component HTML like so:
<div class="container" id="mainOuter" [@form2Head]='showModal'>
<div class="container" id="mainInner">
<form class='frm'>
<h1>Please Enter Your Access Code:</h1>
<label for="AccessCode">Access Code:</label>
<input type="text" name='AccessCode' placeholder="Access Code" [(ngModel)]='AccessCode'>
<button class="submit" (click)='routeConfirm(AccessCode)'>Submit</button>
</form>
<div class="straggler">
<i class="fa fa-gear" id='reset'(click)='animate()'></i>
<h1 class="sweeptitle">--- Title Of Sweep ---</h1>
<h1 class="tagline">--- Tagline ---</h1>
</div>
</div>
</div>
<div class="modalContainer"[@form2Head]='showModal' *ngIf='clicked==true'>
<app-confirm [Id]='AccessCode'></app-confirm>
</div>
and controlling the animation in the component TS file like so:
animate(): void{
this.showModal = (this.showModal === 'hidden'? 'shown': 'hidden');
console.log(this.showModal);
}
and
clicked: boolean = false;
routeConfirm = function(): void{
this.clicked = !this.clicked;
this.animate();
}
}
Not sure why it would stop though...