When I serve my Angular app normally, everything works fine. But when I try to serve it in production mode, I encounter this error that is leaving me quite perplexed.
//error on build: Expected 2 arguments, but got 1.
<ion-col class="ion-no-padding" size-md="12" size-lg="12" size-sm="12" size-xs="12"
*ngFor="let i=index; let post of person$ | async | sortPipe">
page.ts
//vars;
personSubject = new ReplaySubject<any>(1);
person$: Observable<any> = this.personSubject.asObservable();
private destroy$ = new Subject();
getAllPosts() {
this.authService.getAllPosts().pipe(takeUntil(this.destroy$)).subscribe((res: any) => {
const length = res.length;
console.log(length);
this.getFullPosts = res.data.post;
this.personSubject.next(res.data.post)
this.userGallery = res.data.post.forEach(img => {
img.galleryImages = img.images.map(image => {
return new ImageItem({ src: image, thumb: image });
});
})
});