fix(compiler): fix where pipes live
Impure pipes need to live on the view
that used them and need a new instance for
each call site.
Impure pipes need to live on the component view, cached across all child views,
and need a new pure proxy for each for
each call site that lives on the view
of the call site.
Fixes #8408
This bug was introduced not long ago by 152a117d5c
This commit is contained in:
@ -127,16 +127,7 @@ export class CompileView implements NameResolver {
|
||||
}
|
||||
|
||||
callPipe(name: string, input: o.Expression, args: o.Expression[]): o.Expression {
|
||||
var compView = this.componentView;
|
||||
var pipe = compView.purePipes.get(name);
|
||||
if (isBlank(pipe)) {
|
||||
pipe = new CompilePipe(compView, name);
|
||||
if (pipe.pure) {
|
||||
compView.purePipes.set(name, pipe);
|
||||
}
|
||||
compView.pipes.push(pipe);
|
||||
}
|
||||
return pipe.call(this, [input].concat(args));
|
||||
return CompilePipe.call(this, name, [input].concat(args));
|
||||
}
|
||||
|
||||
getLocal(name: string): o.Expression {
|
||||
|
Reference in New Issue
Block a user