When creating Angular JS service methods, what is the recommended approach: accepting multiple parameters or utilizing an object?
var getMessages = function (appid, userId, limit) {
var data = {
"appid": appid,
"userId": userId,
"limit": limit,
}
// Make REST API call using the data variable
}
OR
var getMessages = function (data) {
// Make REST API call using the data variable
}