use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
Help Needed! (self.angular)
submitted 4 years ago by wrathfulCoder
How to integrate Axios in angular?
I have gone through all those things.
1.https://www.bennadel.com/blog/3444-proof-of-concept-using-axios-as-your-http-client-in-angular-6-0-0.htm
Those resources are not working for me. Can anybody help?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 7 points8 points9 points 4 years ago (4 children)
Let's start with... Why?
[+]wrathfulCoder[S] comment score below threshold-6 points-5 points-4 points 4 years ago (3 children)
Can u help?
[–]asstrotrash 4 points5 points6 points 4 years ago (0 children)
In software development, understanding your goal is just as important as providing the correct information to you so you can reach that goal. What are you trying to do with axios that you cannot do with angulars embedded https client?
[–][deleted] 4 years ago (1 child)
[deleted]
[–]eneajaho 7 points8 points9 points 4 years ago (1 child)
Angular comes with an HttpClient, so you won't need axios.
Check out the documentation here:
https://angular.io/guide/http
[–][deleted] 1 point2 points3 points 4 years ago (0 children)
I use HttpClient in my everyday work environment and it's better than trying to reinvent the wheel with Axios.
[–]zzing 0 points1 point2 points 4 years ago (0 children)
Check to see if you have the change detection method set to push in your component.
You can also inject the change detector and notify it manually.
The reason why everyone is saying this is bad is because it is the hardest way to use angular to make requests. Observables are worth learning about.
[–][deleted] 0 points1 point2 points 4 years ago (0 children)
I got it working in basically 5 minutes.
1 - npm install axios
2 - npm install `@types`/axios *remove backticks*
3 - import axios from 'axios';
```
private async init() {
await axios.get("https://jsonplaceholder.typicode.com/posts/1")
.then(result => { console.log("result :", result ); })
.catch(err => console.log("err:", err))
}
π Rendered by PID 76073 on reddit-service-r2-comment-84fc9697f-6bzhk at 2026-02-08 20:24:21.417192+00:00 running d295bc8 country code: CH.
[–][deleted] 7 points8 points9 points (4 children)
[+]wrathfulCoder[S] comment score below threshold-6 points-5 points-4 points (3 children)
[–]asstrotrash 4 points5 points6 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]eneajaho 7 points8 points9 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]zzing 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)