You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Thanks for the awesome tutorial! It's been very helpful. I'm just having a hard time adding animation.
I'm using Angular's built in @angular/animations. I have animation working but I think there is a problem with the workflow service. It always re-renders the first page(personal) when you click the next button. Maybe because it thinks it's invalid?
I'm sure this isn't a problem with the wizard itself. Would love to hear your thoughts as I'm a bit overwhelmed. Thanks in advance! :)
app.component.ts
import{Component,OnInit,Input}from'@angular/core';import{trigger,state,style,animate,transition,query}from'@angular/animations';import{FormDataService}from'./data/formData.service';
@Component({selector: 'multi-step-wizard-app',templateUrl: './app.component.html',animations: [trigger('routerAnimation',[transition('* <=> *',[// Initial state of new routequery(':enter',style({position: 'fixed',width:'100%',transform: 'translateX(-100%)'}),{optional:true}),// move page off screen right on leavequery(':leave',animate('500ms ease',style({position: 'fixed',width:'100%',transform: 'translateX(100%)'})),{optional:true}),// move page in screen from left to rightquery(':enter',animate('500ms ease',style({opacity: 1,transform: 'translateX(0%)'})),{optional:true}),])])]})exportclassAppComponentimplementsOnInit{title='Multi-Step Wizard';
@Input()formData;constructor(privateformDataService: FormDataService){}// change the animation stategetRouteAnimation(outlet){console.log("getRouteAnimation fired!")returnoutlet.activatedRouteData.animation;}ngOnInit(){this.formData=this.formDataService.getFormData();console.log(this.title+' loaded!');}}
app.component.html
<!-- Content Area --><divclass="tab-content" [@routerAnimation]="getRouteAnimation(route)"><!-- Nested view --><router-outlet#route="outlet"></router-outlet></div><!-- End Content Area -->
Hello! Thanks for the awesome tutorial! It's been very helpful. I'm just having a hard time adding animation.
I'm using Angular's built in
@angular/animations
. I have animation working but I think there is a problem with the workflow service. It always re-renders the first page(personal) when you click the next button. Maybe because it thinks it's invalid?I'm sure this isn't a problem with the wizard itself. Would love to hear your thoughts as I'm a bit overwhelmed. Thanks in advance! :)
app.component.ts
app.component.html
app-routing.module.ts
The text was updated successfully, but these errors were encountered: