Not able to pass phalcon route key to angularjs
Route:
//Define a route
$router->add(
"userList",
array(
"controller" => "user",
"action" => "get",
)
);
With in AngularJs:
this.getUsers = function() {
var defer = $q.defer();
$http.get("userList")
.success(function(data) {
defer.resolve(data);
})
With in angularjs if i pass route value directly like (user/get i.e controllername/action) then everything works fine but if i pass route key(userList) it is showing error as "UserlistController handler class cannot be loaded"
return defer.promise;
}
I want to pass route key(userList) not its value(user/get)
Any idea how to do this ?