You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
More issue! SyntaxError: JSON Parse error: Unexpected identifier "object" #3
So on your ChatDetailCtrl, you have
$scope.chatToUser = $stateParams.otherUser;
$scope.chatToUser = JSON.parse($scope.chatToUser);
It return error: SyntaxError: JSON Parse error: Unexpected identifier "object"
I try to do console.log ($stateParams.otherUser) and it return [object object] which I can not open it in console. No idea what kind of object it is. And I never see to pass object like this in stateParam. The usage is new to me and I can not find any doc to explain passing object like this. Please explain.
To open an object in the console you can do console.log(JSON.stringify($stateParams.otherUser)). This is the place where one state sends data to another state. If you pass in an object in the first one, you should receive an object here. Can you check that?
Activity
arvindr21 commentedon Sep 18, 2015
To open an object in the console you can do
console.log(JSON.stringify($stateParams.otherUser)). This is the place where one state sends data to another state. If you pass in an object in the first one, you should receive an object here. Can you check that?