离子框架中带有2个参数的$ http.get(angularjs)

fxb*_*ara 2 angularjs ionic-framework ionic

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

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

我想发送2个参数,如:

getUserBand: function(email,param2) {
        How to call 2 parameter in this field?
    },
Run Code Online (Sandbox Code Playgroud)

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

kTT*_*kTT 5

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

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