I want to pass a object containing multiple string values to another component using angularjs bindings.
const personName = {
firstName: this.conversation.customer.firstName,
lastName: this.conversation.customer.lastName
};
const template = `
<register-task-popup
chat-contact-info='${personName}'
></register-task-popup>`;
this.$mdDialog.show({
template,
targetEvent: null,
clickOutsideToClose: false
});
In my registerTaskPopUpComponent
I have:
selector: 'register-task-popup',
bindings: {
chatContactInfo: '<'
}
private chatContactInfo: any;
public async $onInit() {
console.log(this.chatContactInfo);
}
When I run the code the console only logs:
angular.js:15567 Error: [$parse:ueoe] Unexpected end of expression: [object
I'm not sure what's causing the error.