AngularJS V4 Configuration API Reference for Realtime Apps

AngularJS V4 complete API reference for building Realtime Applications on PubNub, including basic usage and sample code.

Initialization

Pubnub Angular service is a wrapper for PubNub JavaScript SDK that adds a few extra features to simplify Angular integrations:

  • Multiple instance behavior: All instances are accessible throughout application via Pubnub service.Screenshot 2018-02-15 14.02.13.png
  • Events: Delegated methods accept the triggerEvents option which will broadcast certain callback as an AngularJS event.
  • A $pubnubChannel object that seamlessly binds a PubNub channel to a scope variable that gets updated with realtime data and allows you to interact with the channel through dedicated methods.
  • A $pubnubChannelGroup object that provides an easy-to-use interface for channel groups. It stores the incoming messages in containers split by the channel and exposes an interface to directly fetch messages by channel.

You can still use the native Pubnub JavaScript SDK if you feel this will be more suitable for your situation.

INTEGRATING PUBNUB ANGULARJS SDK INTO YOUR APP

Your HTML page will include 2 key libraries:

  • PubNub JavaScript SDK
  • PubNub JavaScript SDK AngularJS Service

UUID

DESCRIPTION

These functions are used to set/c the fly.

METHOD(S)

To set/get UUID you can use the following method(s) in AngularJS V4 SDK

Pubnub Angular service is a wrapper for PubNub JavaScript SDK that adds a few extra features to simplify Angular integrations:

  • Multiple instance behavior: All instances are accessible throughout application via Pubnub service.
  • Events: Delegated methods accept the triggerEvents option which will broadcast certain callback as an AngularJS event.
  • A $pubnubChannel object that seamlessly binds a PubNub channel to a scope variable that gets updated with realtime data and allows you to interact with the channel through dedicated methods.
  • A $pubnubChannelGroup object that provides an easy-to-use interface for channel groups. It stores the incoming messages in containers split by the channel and exposes an interface to directly fetch messages by channel.

Authentication Key

DESCRIPTION

This function provides the capability to reset a user's auth Key. Typically auth Key is specified during initialization for PubNub Access Manager enabled applications. In the event that auth Key has expired or a new auth Key is issued to the client from a Security Authority, the new auth Key can be sent using setAuthKey().

METHOD(S)

To set/get UUID you can use the following method(s) in AngularJS V4 SDK

Pubnub Angular service is a wrapper for PubNub JavaScript SDK that adds a few extra features to simplify Angular integrations:

  • Multiple instance behavior: All instances are accessible throughout application via Pubnub service.
  • Events: Delegated methods accept the triggerEvents option which will broadcast certain callback as an AngularJS event.
  • A $pubnubChannel object that seamlessly binds a PubNub channel to a scope variable that gets updated with realtime data and allows you to interact with the channel through dedicated methods.
  • A $pubnubChannelGroup object that provides an easy-to-use interface for channel groups. It stores the incoming messages in containers split by the channel and exposes an interface to directly fetch messages by channel.

Filter Expression

DESCRIPTION

This function provides the capability to reset a user's auth Key. Typically auth Key is specified during initialization for PubNub Access Manager enabled applications. In the event that auth Key has expired or a new auth Key is issued to the client from a Security Authority, the new auth Key can be sent using setAuthKey().

METHOD(S)

To set/get UUID you can use the following method(s) in AngularJS V4 SDK

Pubnub Angular service is a wrapper for PubNub JavaScript SDK that adds a few extra features to simplify Angular integrations:

  • Multiple instance behavior: All instances are accessible throughout application via Pubnub service.
  • Events: Delegated methods accept the triggerEvents option which will broadcast certain callback as an AngularJS event.
  • A $pubnubChannel object that seamlessly binds a PubNub channel to a scope variable that gets updated with realtime data and allows you to interact with the channel through dedicated methods.
  • A $pubnubChannelGroup object that provides an easy-to-use interface for channel groups. It stores the incoming messages in containers split by the channel and exposes an interface to directly fetch messages by channel.

Send Your Feedback