ngx-cable
v1.2.9
Published
ngx-cable
Downloads
296
Maintainers
Readme
Examples
angular ionic send message
Install
npm install ngx-cable --save
Native build
build instruction
Cable API
setCable(url: string), connect(url: string)
isOpen()
create(params: {channel: string, room: string}), subscribe(params: {channel: string, room: string})
send(data: any, subscriptions?: ActionCable.Subscription[])
perform(action: string, data: any, subscriptions?: ActionCable.Subscription[])
unsubscribe(subscriptions?: ActionCable.Subscription[])
reject(subscription: ActionCable.Subscription)
getSubscriptions()
getCountSubscriptions()
searchSubcriptions(id: int, room: string)
disconnect()
Listener API
on(key)
broadcast(key, data)
off()
Read
http://edgeguides.rubyonrails.org/action_cable_overview.html