javascript - How to perform query string based API call in angular JS -


i new angualr js. have found useful article how connect api , use information show our app using angular js.

http://austinknight.net/weather-app-with-angular-js/

only limitation weather forecast only. can find many api provided world wide forecast can't connect them way author has done here.

$http.get('https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20location%3d%22' + zip + '%22&format=json&diagnostics=true&callback=') 

can please me write such query string based api call country ?

i have done sufficient research couldn't find similar.

please help.

you can pass params this

$http.get('https://query.yahooapis.com/v1/public/yql', {       params: {       q: 'your query',       format: 'json',       diagnostics: true,       callback: ''      } }); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -