Angular HTTP Client Quick Start Tutorial
HTML-код
- Опубликовано: 22 окт 2024
- Start making restful API requests from Angular 4.3+ with the new HTTP client. In this lesson, I show you how to make GET and POST requests, set URL params, headers, handle errors, and more. angularfirebas...
StackBlitz Demo: stackblitz.com...
Angular HTTP: angular.io/gui...
JSON Placeholder: jsonplaceholde...
Swagger Codegen: swagger.io/
Rock you do. A week long self imposed crash course in Angular and your videos have been incredibly useful.
I love your explanation, I asked my whatsapp group members of UI developers ( 1000+ ) to subscribe to your channel . My token of gratitude towards the knowledge I gained by your tutorials.
After searching for long.. got a perfect tutorial.
One of the best video tutorials I've seen
If import { Observable } from 'rxjs/Observable' isn't working, try import { Observable } from 'rxjs'. Worked for me
yes, they changed that in angular 6
AWESOME!!!!!!!!!!!!!!!!!!!! THANK YOU MAN!!!
I like your explanation , plz more tutorials about angular & spring boot
Yay - tutorials with updated angular , Subbed! Amazing at explaining simply too !
Very well explained, clearly, perfectly understandable. Thank you!
Couldn't have been any better. Some concepts changed with the latest versions. But It gives general idea on http communication. Thanks!
best explanation ever! you have a gift man! thanks
Appreciate these awesome tutorials. They've helped me come a long way. Keep up the good work, I enjoy the content you provide.
If you get module ' rxjs/observable ' has no exported member, change it to just 'rxjs' and change the 'posts' property to 'posts!'
Great video, short and to the point!
Thank you. Your pace is just Amazing as always.
ngIf = ngFor)))
Thank you for very good tutorial.
Easy to understand
Amazing, answered all my questions
Hi, you got very interesting tutorials. Next video could be about how to properly implement oAuth 2.0 with angular and external identity provider? How to securely care about auth token and refren token? I think firebase won’t let you do it without blaze plan but it should be possible with nodeJS.
I've thought about doing a strictly Angular version of user auth for non-firebase developers - may do this in the future. Thanks for the suggestion.
That would be really helpful :) I already implemented it in my Angular app but I want to see someone who actually knows what he's doing do it (lol)
DerJP can you share with us how did u do it please !
In Angular6 you need to install rxjs-compat via npm, and then everything will work same as in this video.
Rather not use compat, and actually use the latest tech instead. It's .pipe(map(post => post.Title)) now. All operators go in pipe
Restful is an architecture that says the server has no session state for the user connection, not to be confused with doing http calls.
good. very good explanation. could kindly show us how to create a client with fields to enter user parameters to the restful webservice using the same.
Slow down a little bit
>Settings
>Speed
>0.75
You should try to watch videos on x2 to get the gist of it, then rewatch and maybe slow down to get the details. It saves me time at least.
at 00:41 -> Everybody so far just ignored that cat-formed stain to the right? xD
instead of HttpHeaders object there's even a simpler way to send query parameters. You can use a simple object. Here is the headers and params type from code: headers?: HttpHeaders | {[header: string]: string | string[]} , params?: HttpParams|{[param: string]: string | string[]},
source: github.com/angular/angular/blob/5.0.5/packages/common/http/src/client.ts
Good point, that is a clean way to go. thanks!
thx for your tutorials, they are clear and to the point, very often I learned good stuff from them
finally a sick video!! thank you!!
Please make a video on how to call swagger api in angular !!
Nice and legible video thanks and global error handling any video is available ?
This video needs updating
this helped me a lot. thanks!
core.js:6260 ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
I get this error trying to show post | json
So, what comes in the response is an any? Even if you expect on the http a specific type? Let say the response has id: "asdsdsd" instead of id:11001?
You are importing HttpClientModule, others are importing HttpClient, both from Angular Core. Whats the difference or is there any?
HttpClientModule is the newer, better API. It parses JSON automatically and has a few other improvements. Eventually the old one will be removed. medium.com/@amcdnl/the-new-http-client-in-angular-4-3-754bd3ff83a8
I'm using the same code u did but i get an error in this.http.get saying that httpClientModule didn't know the get .. what to do ?
Thank you sir . Nice tutorial.
Great knowledge sharing and thanx for ur videos and need i18n in angular 5
thank you so much! This helped a ton
ERROR in node_modules/rxjs/Observable.d.ts:1:15 - error TS2307: Cannot find module 'rxjs-compat/Observable' or its corresponding type declarations.
But if error is coming in the first place only, then why should we use .retry() as it is going to show error only
how to add js file to angular html component.I am able to link normal html file to a js file using script tag and run in node.js but unable to do same in angular component.Please help.
Should we access the data on server using $_POST[] (PHP as backend ) while posting using Angular this.http.post() ??
The tutorials doesn't work anymore with the newer versions of angular. Check out the official documentation in the description
Hey can you make a quick real world example of unit testing angular components and services?
Thank you soooo much for this !
Where is my book?? 😉 Nice tutorial.👍
Did you signup for pro? If you did not get the auto-email, please email hello@angularfirebase.com or send me a message on slack.
How is it that no one that make these tutorials get a CORS error?
i thought subscribing is compulsory to see the returned values ...
Thanks My bro
Can i use api for machine learning to display data
How i can do that
Thanks
import 'rxjs/add/operator/map';
used .map but isnt working, mine is angular 7??
I believe you can just do this instead import { map } from "rxjs" that should work
If someone still need it...
In angular 8:
Import {map} from 'rxjs/operators';
.pipe(map(post => post.title))
What linux do you have?
hey, Can you create a video about XSRCF Token send by angular 6 to server who need csrf token please?
How can I access my local JSON file which is served by http-server from "localhost:8080/resources" ,
The response Iam getting at browser console network is " Status:200, cause: xhr, Type:json, Transfered:124kb "
But I couldn't see the output in angular app.
code used:
getPosts() {
this.posts = this.http.get(this.ROOT_URL + '/example.json');
}
“Ok today I will explain http, angular and api’s... Did you get all that?
Now send an api call to subscribe to the Chanel. End of presentation!”
Jesus Christ I think I ruined my mouse left button due to too many pause hits.
Thank you for tutorial. Please tell me why i can list my users in console but i cant show them in page. how can i transform the response from the API into an array?
I am using version6
It sounds like you need to JSON.parse() your api response. Until you do that, it's just a string.
Could show angular with axios ?
[ts] Property 'map' does not exist on type 'Observable'. [2339] , kindly help me which import i need in angular 77777777777777777777
See arshdeeps comment above
i don't understand how to use HttpHeaders anyone can explain for what can i use it ?
I always use post
at 3:14 its ngFor not ngIf
3:12 that's an *ngFor not an *ngIf :)
Oops, meant to say ngFor right there. Good catch.
no problem ;) great video as usual very informative keep up the good work Jeff!
Next - find the spelling mistakes :)
Actually is a good practice to use *ngIf in *ngFor, it's a good change to get an error in console if data it'd not coming very fast.
*ngFor= "let post of posts | async"
What mean this "| async"?
{{ post | json }}
| is a pipe and "async" tells the ngFor directive that "posts" are async.
"posts" is an observable.
How do you type so fast? lol
I cant even see
Thank you
3:35 typescript http get
Very nice
Thank you!
So clearly
very good
My Chrome console doesnt give a shit about the post request response error, lol
excellent
so no more subscribing?
Thanks👏👏👏👏👏
Great ...
SLOW for next tutorial impossible to follow....
dude u too fast
Thanks
How can use facebook api to get facebook posts in angular5
Angular has too much boilerplate code
bad video coz it is not clear about httpheaders
SLOW IT DOWN MAN
Finally a Non Indian Accent Video hahaha
very fast....mb this is good explain but i am nihua neponyal
PLS How can i save image in my project folder in angular 7??
Plenty of stackoverflow questions on that. Give it a google
@@NilsMoller I already do it but I didn't get what I want