Angular 2 Tutorial (2016) – HTTP (GET and POST to RESTful Service)




Want much more Angular 2? Also check out my brand-new Udemy course, which will go into much more detail than this video series. Get it now for only $15: …

Original source


34 responses to “Angular 2 Tutorial (2016) – HTTP (GET and POST to RESTful Service)”

  1. A little answer. I'm new in angular and I your solution works perfectly when I don't put any Authorization Header, when I put them, I get a cors error, but with a c# client does happen. I hope I made my self clear because my english it's not the best. Thank you from now

  2. Hii. it is a wonderful video for me to start calling api's. but i am facing issue of CORS in accessing the datetime Json like yours.
    error : XMLHttpRequest: Network Error 0x80070005, Access is denied. 🙁 please provide inputs.

  3. Hi Max! I am triying to understand this part from ngModel: " Creates a FormControl instance from a domain model and binds it to a form control element." this is from the official Documentation, could you please explain me what is a domain model in a friendly way? 😉 thank you in advance.

    PD: I have searched in stackoverflow and other sites but i did not find anything clear to me ;(

  4. UPDATE: forgot import {Headers} from 'angular2/http';

    It didn't like "headers=new headers();" but Visual Studio Code did like it, had to uses "headers= new Headers();"??? but still have error on postJSON()

  5. I can't get far with this at all:
    Argument of type '{ selector: string; templateUrl: string; directives: typeof HttpTestComponent[]; }' is not assignable to parameter of type 'Component'.
    Object literal may only specify known properties, and 'directives' does not exist in type 'Component'.

Leave a Reply