Hello,
I have a channel instanced in my angular app but i want to perform with action 'pull_items' in a ruby api with some data, but doesn't happend properly? or i really dont understand what is the porpose to perform method with the action param and data param.
Here look a example
const cable = this.cable.getActualCable();
const channel = cable.channel('ShoppingCartChannel');
channel.perform('push_items', 'some');
channel.perform('pull_items')
then the channel.connected()suscription must catch with a calback fn some data
when i debug with develop tools in chrome i see my other channel doing the perform correctly like this
{"command":"message","identifier":"{\"channel\":\"NotificationChannel\"}","data":"{\"action\":\"unreads\"}"}
and 'push_items'
{"command":"message","identifier":"{\"channel\":\"ShoppingCartChannel\"}","data":"\"some\""}
I see a difference between to logs in the key data
then what should i do?
I appreciate your understanding
Hello,
I have a channel instanced in my angular app but i want to perform with action 'pull_items' in a ruby api with some data, but doesn't happend properly? or i really dont understand what is the porpose to perform method with the action param and data param.
Here look a example
const cable = this.cable.getActualCable();const channel = cable.channel('ShoppingCartChannel');channel.perform('push_items', 'some');channel.perform('pull_items')then the
channel.connected()suscription must catch with a calback fn some datawhen i debug with develop tools in chrome i see my other channel doing the perform correctly like this
{"command":"message","identifier":"{\"channel\":\"NotificationChannel\"}","data":"{\"action\":\"unreads\"}"}and 'push_items'
{"command":"message","identifier":"{\"channel\":\"ShoppingCartChannel\"}","data":"\"some\""}I see a difference between to logs in the key data
then what should i do?
I appreciate your understanding