Revert "fix(animations): ensure multi-level enter animations work (#19455)"

This reverts commit dd6237ecd9.
This commit is contained in:
Miško Hevery
2017-11-28 15:08:44 -06:00
parent 6b4c24020d
commit add5953aa1
8 changed files with 76 additions and 165 deletions

View File

@ -62,6 +62,8 @@ export function buildAnimationAst(
const LEAVE_TOKEN = ':leave';
const LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');
const ENTER_TOKEN = ':enter';
const ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');
const ROOT_SELECTOR = '';
export class AnimationAstBuilderVisitor implements AnimationDslVisitor {
@ -476,7 +478,8 @@ function normalizeSelector(selector: string): [string, boolean] {
selector = selector.replace(SELF_TOKEN_REGEX, '');
}
selector = selector.replace(LEAVE_TOKEN_REGEX, LEAVE_SELECTOR)
selector = selector.replace(ENTER_TOKEN_REGEX, ENTER_SELECTOR)
.replace(LEAVE_TOKEN_REGEX, LEAVE_SELECTOR)
.replace(/@\*/g, NG_TRIGGER_SELECTOR)
.replace(/@\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.substr(1))
.replace(/:animating/g, NG_ANIMATING_SELECTOR);