Hey there. I’m trying to find a starter using the last techs of Angular and Strapi. I wanted to have a starter like the legacy starter. While I understand it is deprecated for a tons of valid reasons, the reason I ask a “starter” is mostly because of the structuring data problem I’m facing is really difficult to understand here.
Is there any way I can see how we could handle the new apis returned by Strapi somewhere ? I’m having a terrible moment manipulating the data to get it out from a simple Angular app.
I mean you can use any starter and just build a standard angular app and fetch the endpoints
Personally using angular and I always separate the projects as I serve angular in a different location then my strapi application, so they do live in different repos.
And this is the answer I’m getting, on discord they suggested me to map it like this :
result = contenu.data.map(e => e.attributes)
but I can’t seem to put it on my front that looks like this :
<h1 *ngFor="let contenu of contenu">{{ contenu['attributes.testtest'] }}</h1>
<p>
<markdown *ngFor="let contenu of contenu">
{{ contenu['attributes.testcontenu'] }}
</markdown>
I’m just trying to get the data out of my array working on the dynamic angular app, so this is kind of why I was looking at an available starter that would explain how to get them back on Strap v4.
If you are using angular i would suggest use RXJS instead More solid to be used then “fetch”
As you can do pipes with it and then do the map in there and then use ngFor etc
I used a “util.inspect”, a node.js utility, to display the Strapi object via console.log. Once I saw the schema, I could use Map() to iterate through the Strapi object.
Is there any way I can see how we could handle the new apis returned by Strapi somewhere ? I’m having a terrible moment manipulating the data to get it out from a simple Angular app.
Perhaps, I misunderstood the author. I thought by using util.inspect you can see the schema via console log and it will allow him to extract the data in Angular. I apologize if my advice is useless.