yandex
loader

please wait

  • Kamal Thakur Jan-09-2019 09:42:24 AM ( 4 months ago )

    How to hit APIs from a ionic application ?

  • Sonam Vashishth Jan-09-2019 09:43:32 AM ( 4 months ago )

    import { HttpClient } from '@angular/common/http';

     

     constructor(public navCtrl: NavController, public httpClient: HttpClient) { 

        this.films = this.httpClient.get('https://swapi.co/api/films');

        this.films

        .subscribe(data => {

          console.log('my data: ', data);

        })

      }

Please login

Similar Discussion

Recommended For You