@raj_rohan563 wrote:
angular.module('parse-starter.controllers')
.controller('FetchCtrl',function ($scope,$state) {
$scope.User =[];
$scope.getUser =function(params){
var User = Parse.Object.extend(User);
var query = new Parse.Query(User);
if(params !== undefined) {
if(params.username !== undefined) {
query.equalTo("username", params.username);
}
if(params.fn !== undefined) {
query.equalTo("fn", params.fn);
}
}
query.find({
success: function(results) {
$scope.User = results; },
error: function(error) {
alert("Error: " + error.code + " " + error.message);
}
});
}
});
This is the Html
Posts: 3
Participants: 1