test: improve symbol-extractor test by ignoring $1 suffix (#28098)
PR Close #28098
This commit is contained in:

committed by
Andrew Kushnir

parent
da2880d7c4
commit
6a9a48b0ac
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {ChangeDetectorRef, Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';
|
||||
import {Directive, DoCheck, EmbeddedViewRef, Input, IterableChangeRecord, IterableChanges, IterableDiffer, IterableDiffers, NgIterable, TemplateRef, TrackByFunction, ViewContainerRef, forwardRef, isDevMode} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
@ -151,7 +151,7 @@ export class NgForOf<T> implements DoCheck {
|
||||
this._differ = this._differs.find(value).create(this.ngForTrackBy);
|
||||
} catch {
|
||||
throw new Error(
|
||||
`Cannot find a differ supporting object '${value}' of type '${getTypeNameForDebugging(value)}'. NgFor only supports binding to Iterables such as Arrays.`);
|
||||
`Cannot find a differ supporting object '${value}' of type '${getTypeName(value)}'. NgFor only supports binding to Iterables such as Arrays.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -218,6 +218,6 @@ class RecordViewTuple<T> {
|
||||
constructor(public record: any, public view: EmbeddedViewRef<NgForOfContext<T>>) {}
|
||||
}
|
||||
|
||||
export function getTypeNameForDebugging(type: any): string {
|
||||
function getTypeName(type: any): string {
|
||||
return type['name'] || typeof type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user