2017-07-30 4 views
0

Je suis en train de construire mon application angulaire 4.3 en mode --prod et je reçois l'erreur suivante (construction normale fonctionne parfaitement):Recursion pas pris en charge, la résolution de symbole routerAnimation

ERROR in Recursion not supported, resolving symbol routerAnimation in .. 

Voici comment mon admin .component.ts ressemble:

animations: [ 
    trigger('routerAnimations', [ 
     transition('* => page1', [ 
     useAnimation(routerAnimation) 
     ]), 
     transition('* => page2, [ 
     useAnimation(routerAnimation) 
     ]), 
    ]) 
    ] 

et mon code d'animation:

export const routerAnimation = animation([ 
    query(':enter, :leave', style({ position: 'fixed', left: 0, right: 0 }), {optional: true}), 
    query(':leave', style({ zIndex: 100 }), {optional: true}), 
    query(':enter', style({ transform: 'translateX(-150%)' }), {optional: true}), 
    group([ 
    query(':leave', group([ 
     animate('300ms cubic-bezier(.35,0,.25,1)', style({ transform: 'translateX(200%)', opacity: 0 })), // y: '-100%' 
     animateChild() 
    ]), {optional: true}), 
    query(':enter', group([ 
     animate('300ms cubic-bezier(.35,0,.25,1)', style({ transform: 'translateX(0%)' })), 
     animateChild() 
    ]), {optional: true}) 
    ]) 
]); 

Après quelques tes ts, j'ai remarqué que l'erreur apparaît uniquement lorsque vous utilisez le code d'animation suivant:

group([ 
    query(':leave', group([ 
     animate('300ms cubic-bezier(.35,0,.25,1)', style({ transform: 'translateX(200%)', opacity: 0 })), // y: '-100%' 
     animateChild() 
    ]), {optional: true}), 
    query(':enter', group([ 
     animate('300ms cubic-bezier(.35,0,.25,1)', style({ transform: 'translateX(0%)' })), 
     animateChild() 
    ]), {optional: true}) 
    ]) 

Une idée de ce qui ne va pas?

Répondre

0

cette question comme Semblent avec le compilateur angulaire AOT, numéro déjà ouvert dans angular github

Quelqu'un a présenté un bugfix pour hier, il sera probablement corrigé dans la prochaine version angulaire.