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
Post a Comment