离子框架中带有2个参数的$ http.get(angularjs) [英] $http.get with 2 parameter in ionic framework (angularjs)

查看:170
本文介绍了离子框架中带有2个参数的$ http.get(angularjs)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的$ http.get有一个参数,它的工作方式如下:

I have my $http.get with one parameter, and it works like :

getUserBand: function(email) {
        return $http.get(baseUrl + 'selectUserBand.php?email=' + email);
    },

我想发送2个参数,如:

I want to send 2 parameter like :

getUserBand: function(email,param2) {
        How to call 2 parameter in this field?
    },

如何在$ http.get字段中调用email和param2?

How to call email and param2 in the $http.get field?

推荐答案

您可以使用'&'追加参数:

You can append param with '&':

getUserBand: function(email,param2) {    
  $http.get(baseUrl + 'selectUserBand.php?email=' + email + '&param2=' + param2);
}

这篇关于离子框架中带有2个参数的$ http.get(angularjs)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆