0

I have an Angular App that when built using the --prod flag, queries don't return data from the API (shows "pending" in network tab chrome debugger), yet I can step through the API code and see that it has the collections of data.

The queries return fine when building without --prod. The data is being served into Telerik Kendo Charting components, although doubtful it's related seeing as the request never seems to return or leave "pending" status.

The queries are grouped in the API before being sent back across the wire and I'm not sure if that's related as it works fine without --prod.

Here's an example of a query from endpoint in my .Net API that just shows "pending" in the browser network tab.

        var aggregateQuery =
            from b in query
            group b by new { Key = 1 } into g
            select new {
                TotalCharges = g.Sum(b => b.AmountCharges),
                TotalSavings = g.Sum(b => b.AmountReduction),
                TotalUCAmt = g.Sum(b => b.AmountReview),
                TotalAllowed = g.Sum(b => b.AmountAllowed),
            };
       return aggregateQuery.FirstOrDefault();

Again, why does it work without issue when I build angular without the --prod flag? Is there an issue returning grouped queries when bundled using --prod?

billy_comic
  • 867
  • 6
  • 27

1 Answers1

0

In my case I had the below *ngFor style in my component, which causes the ui to lock when dealing with large lists.

<mat-option *ngFor="let item of filterItemList(item.Name)">{{item.Description}}</mat-option>

Using below Pipe works

<mat-option *ngFor="let item of listItems | filterItemPipe:item.Name">{{item.Description}}</mat-option>
billy_comic
  • 867
  • 6
  • 27