Answer the question
In order to leave comments, you need to log in
AngularJS and request via jsonp?
Good day.
Faced a problem.
There is access to the API of the form:
randomsite.ru/manufacturers?userlogin=USER_LOGIN&u...
Upon request, JSON is returned
Decided to process JSON using AngularJS
var app = angular.module('avtoz', []);
var url = "http://randomsite.ru/manufacturers?userlogin=USER_LOGIN&userpsw=USER_PSW&userkey=USER_KEY";
app.controller('modelsFn', function ($scope, $http){
$http.jsonp(url + '&callback=JSON_CALLBACK').then(function(data) {
$scope.models = data;
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question