I want to pass data through template but i am getting undefined i have two variables inside the customer template and when user click i want to pass these two var to the next template customerchathistory like
Template.customer.events({
async 'click .list-chat'(event,template) {
const Rid = event.currentTarget.id;
const Rtoken = event.currentTarget.token;
}
})
Here i am passing those var like this in customer.html
{{>cutomerChatHistory clickRid= Rid clickRtoken = Rtoken }}
Now when i am fetching these two var inside the customerChatHistory.js i am getting undefined
Template.customerChatHistory.onCreated(function() {
const currentData = Template.currentData();
console.log(currentData.clickRid , currentData.clickRtoken) //giving undefined here
})