Is there a method in angularJS thats equal to getJSON. [Newbie alert]

后端 未结 6 1336
灰色年华
灰色年华 2021-01-12 15:00

I\'m newbie at javascript, angularJS and JQuery, but I have just started programming a angularJS app where i use JQuery to get a JSON from a webserver like this:

<         


        
6条回答
  •  [愿得一人]
    2021-01-12 15:16

    function ListProdcutsCtrl($scope, $http) {
        var request = {'searchString' : 'apple'};
        $http.get('/api/products', request).success(function(response) {
            $scope.products_table_data = response.products;
        });
    

提交回复
热议问题