Comments (5)
Hi, I'm not sure what the issue is. You're not handling an error, what would you expect ?
from angular.
We will definitely need a reproduction in Stackblitz in order to investigate further. I suspect whatever data library you're using is returning an object that isn't actually an Array
(maybe a proxy?) [Symbol.iterator]
should definitely be a function for any collection that @for
supports.
from angular.
I'll see whether I can put one together. As noted it only seems to happen when using the response from the API.
Checking all the points through the code (browser debug console, console logging & dumping the JSON) shows it as an array.
The API endpoint is written in nest.js, so is also typescript based. I've hard-coded the data in the API to be an array to make sure that's what was being returned, but it still fails.
from angular.
@alxhub Based on your comment about a proxy I changed the code to use the API directly and it works. Seems to be something in how I've implemented ngrx/store which is causing the error.
Once I've found the problem I'll add a comment here in case anyone else comes across the same thing.
Thanks for the help.
from angular.
The issue was down to a typo in the definition of the initial state object.
Instead of "array: <Type[]>[];" it was "array: <Type[]>{};" so the initial value in the store was not an array type., causing the error.
from angular.
Related Issues (20)
- Improve SEO of angular.dev HOT 1
- Bounds attributes [attr.xxx] do not trigger directives HOT 5
- Reactivity: effects won't execute if created in a component that is detached from a change detection tree HOT 1
- Recursion bug in Angular (child in defer block) HOT 5
- Is there a way of renaming input component bindings HOT 2
- Pipes API Documentation Link is Invalid HOT 1
- Angular localstorage not working with SSR inside Authguard HOT 1
- Subject: Feature Request: Restore Reset Functionality for contentChildren Signal API HOT 3
- Broken zone-patch-rxjs in Zone.js 0.14.5
- Allow Custom CSS Variables in [ngStyle] and Renderer2.setStyle HOT 1
- Add support for "on-site" view transitions HOT 3
- Routing stops working with no errors being shown HOT 3
- Angular 17 fakeAsync tasks not running until test is cleaned up with 'resetFakeAsyncZone()' HOT 1
- Request with HttpClient not displayed in browser inspector but works HOT 7
- platform-browser.mjs _getStyleElement function under SharedStylesHost class trigger CSP error HOT 2
- Not found images from tutorial HOT 1
- Animation trigger can be bound using @HostBinding and not using the host property HOT 4
- NgOptimizedImage retrieving width not listed on breakpoints HOT 1
- DevTools cause Firefox to consume high CPU and memory on Microsoft 365 websites HOT 1
- docs: is not recognized as an internal or external command, operable program or batch file HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.