ngx-cable

1.2.9 • Public • Published

NgX-Cable

Integrate ActionCable into your application.

Examples

angular
ionic
send message

Install

npm install ngx-cable --save

Native build

build instruction

Cable API

setCable(url: string), connect(url: string)

Connect to channel

isOpen()

Сhecking connection status

create(params: {channel: string, room: string}), subscribe(params: {channel: string, room: string})

Create a channel subscription

send(data: any, subscriptions?: ActionCable.Subscription[])

Send message to subscribers

perform(action: string, data: any, subscriptions?: ActionCable.Subscription[])

Send message to subscribers

unsubscribe(subscriptions?: ActionCable.Subscription[])

Unsubscribe from subscriptions

reject(subscription: ActionCable.Subscription)

Unsubscribe from the subscription

getSubscriptions()

Get active Subscriptions

getCountSubscriptions()

Get count Subscriptions

searchSubcriptions(id: int, room: string)

Search for a subscription

disconnect()

Disconnect from channel

Listener API

on(key)

broadcast(key, data)

off()

Read

http://edgeguides.rubyonrails.org/action_cable_overview.html

Package Sidebar

Install

npm i ngx-cable

Weekly Downloads

1

Version

1.2.9

License

MIT

Unpacked Size

7.63 kB

Total Files

6

Last publish

Collaborators

  • mr_makss