Skip to content

More issue! SyntaxError: JSON Parse error: Unexpected identifier "object" #3

@hughred22

Description

@hughred22

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions