После обновления с Angular 7 до Angular 8 мой pipe перестал работать с ошибкой:
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
10 | export class APipe implements PipeTransform {
11 |
> 12 | constructor(
| ^
13 | private readonly bPipe: BPipe,
14 | private readonly cPipe: CPipe) {}
или с аналогичной ошибкой:
Error: Found non-callable @@iterator
Кодмой канал:
@Pipe({
name: 'aPipe'
})
export class APipe implements PipeTransform {
constructor(
private readonly bPipe: BPipe,
private readonly cPipe: CPipe) {}
transform(someValue: any, args?: any): any {
if (!someValue) {
return ' — ';
}
if (cond1) {
return this.bPipe.transform(someValue, ...args);
}
else {
return this.cPipe.transform(someValue, ...args);
}
return ' — ';
}
}
Должен ли я пометить канал как @Injectable()
явно в Angular8 или в чем проблема?