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)
- Angular SSG: Incompatibility between withXsrfConfiguration( ) (HttpClient) & Relative Paths in SSG HOT 2
- Angulars Service Worker - "beforePushNotification" HOT 1
- input signal effects are not run when attaching a directive to an IonButton HOT 3
- Mejorar uso de Pipes HOT 1
- Computed signals and Effects should produce runtime warning if dependencies reaches zero HOT 1
- Dead area for scrolling: Column for right hand menu HOT 1
- More user testing of angular.io HOT 4
- URL containing space fails to be fetched during prerender phase HOT 1
- Help me - could not resolve module angular/node_modules/mermaid/dist/mermaid.js HOT 4
- angular tutorial image file missing HOT 1
- dispatchEvent won't call FormGroup.valueChanges in test HOT 4
- Add signals reflecting state of the AbstractControl HOT 3
- Add WritableComputed to allow computed with write operations HOT 5
- Error Message for missing [ngModelOptions]="{standalone: true}" entry dont show line in code where it is missing
- signal(Observable<T>) to signal<T>() operator HOT 5
- I smell a rat, stop ruining angular HOT 4
- Hydration doesn't work for ng-templates that are defined inside of another component
- The system cannot find the file specified. HOT 1
- easier access to untracked function for more readability HOT 1
- Angular.dev: Missing Overview Page for Components HOT 2
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.