I made review page where user can submit reviews. Once he submits review it appears below. I want to make that when user posts review he can reply to it, but once he replies, he has to wait for admin to answer.
It should look like:
`Comment that user submited
User reply
Admin reply
User reply
Admin reply`
....
But I am not sure how to do it.
What I have tried:
I think of saving user status to database when posting reply.
$scope.postReply=function(index,comment){
var status="";
console.log($cookies.get('userCookie'));debugger;
if($cookies.get('userCookie')){
status="user";
}
else{
status="admin";
}debugger;
var JSONObject={
"userStatus":status,
"reviewId":$scope.all[index].id,
"email":$scope.all[index].email,
"time":"",
"comment": comment
};
var Results = UniversalService.PostReply(JSON.stringify(JSONObject));
}
But I am not sure how to show/
hide reply based on that, because my user and admin shares the same view for reviews.
This is my html:
[HTML] <html - Pastebin.com[
^]
Does anyone have any ideas?