Hi, I'm getting a new compiler error when using a comparator, after upgrading to Angular 9.
(The error appears with "fullTemplateTypeCheck": truehttps://angular.io/guide/template-typecheck.)
src/app/navigation/abc/abc.component.html:39:78 - error TS2554: Expected 1-2 arguments, but got 5.
<button *ngFor="let team of teams | async | values | orderBy: 'teamName' : false : false : comparator">
I guess the compiler doesn't like the " : " syntax. Update: Actually the " : " is correct.
The problem seems due to a pipe name conflict between two packages:
ngx-pipes: I use it for other pipes, but it also ships with a simpler orderBy pipe (same name).
When I use orderBy, I mean to use your version (which takes multiple parameters), but seems like the template checker compiler is confusing it with the ngx-pipes version (which takes only 1 parameter).
I'm not sure what the best long-term solution is. Perhaps a merger between the two libraries above, or using different names/prefixes.
Short-term, I need to work-around this error by either disabling fullTemplateTypeCheck, or extending the pipe under a different name, or dropping one of the packages from my project.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, I'm getting a new compiler error when using a comparator, after upgrading to Angular 9. (The error appears with
"fullTemplateTypeCheck": true
https://angular.io/guide/template-typecheck.)I guess the compiler doesn't like the " : " syntax.Update: Actually the " : " is correct.The problem seems due to a pipe name conflict between two packages:
When I use
orderBy
, I mean to use your version (which takes multiple parameters), but seems like the template checker compiler is confusing it with the ngx-pipes version (which takes only 1 parameter).I'm not sure what the best long-term solution is. Perhaps a merger between the two libraries above, or using different names/prefixes.
Short-term, I need to work-around this error by either disabling
fullTemplateTypeCheck
, or extending the pipe under a different name, or dropping one of the packages from my project.