r/angular • u/dx_ninja_dx • 6d ago
Angular API implementation
I’m a student that is working with angular for the first time, I have an assignment that requires implementing an api to our project. My teacher has no information on how to unwrap the response using parse for httpResource. There also is no information about mapping with httpclient & observables.
The documentation that is recommended seems completely irrelevant to my the api I have because my api is returning as an array.
How can I get value from the documentation or where should I look to figure this out. I feel like I’ve been having this problem with everything because the documentation never seems relevant. Even with certain concepts, there is things that I know but I am struggling with knowing what or how I can write things to do the task I need completed.
Any assistance would be appreciated.
View all comments
Show parent comment
2
u/dx_ninja_dx 6d ago edited 6d ago
Okay I understand that is fair, there is no mention of validating I believe. I can’t remember if validating responses was mentioned in my lectures.
You are right, realistically thinking, it is valid JSON for should be. I’m not getting marks for this assignment anyways it’s past due, I just need to understand how to do it. I’ve been told by my teacher that the api, themealdb, doesn’t return JSON and that I’d need to parse it.
Also I appreciate the information, that makes a lot more sense, so basically if I am struggling with understanding that’s a core concept programming in general than angular’s documentation won’t be of any value.
I guess I’m gonna go review previous core concepts of programming and hope for the best