SORU
20 HAZİRAN 2013, PERŞEMBE


$http get parametreleri çalışmıyor

Herkes biliyor neden bu çalışmıyor?

$http
    .get('accept.php', {
        source:link,
        category_id:category
    })
    .success(function (data,status) {
        $scope.info_show = data
    });

ve bu iş:

$http
    .get('accept.php?source=' link '&category_id=' category)
    .success(function (data,status) {
        $scope.info_show = data
    });

Teşekkür ederim!

CEVAP
20 HAZİRAN 2013, PERŞEMBE


get çağrı 2 parametre yapılandırma bir nesnedir. Şöyle bir şey istiyorum:

$http
    .get('accept.php', {
        params: {
            source: link,
            category_id: category
        }
     })
     .success(function (data,status) {
          $scope.info_show = data
     });

BakınArgümanlardaha fazla ayrıntı için http://docs.angularjs.org/api/ng.$http Bölüm

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • cekehechu

    cekehechu

    20 HAZİRAN 2006
  • Marina and The Diamonds

    Marina and T

    8 Temmuz 2008
  • wwjoshdew

    wwjoshdew

    1 AĞUSTOS 2007