Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-phoenix

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-phoenix - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

bower.json
{
"name": "angular-phoenix",
"version": "0.3.0",
"version": "0.3.1",
"authors": [

@@ -5,0 +5,0 @@ "MikaAK <mikakalathil@gmail.com>"

@@ -63,3 +63,3 @@ 'use strict';

this.promise = $q(function (resolve, reject) {
res.promise = $q(function (resolve, reject) {
res.after(5000, reject).receive('ok', function () {

@@ -66,0 +66,0 @@ return resolve(_this2);

{
"name": "angular-phoenix",
"version": "0.3.0",
"version": "0.3.1",
"description": "Native bindings for phoenix in angular",

@@ -5,0 +5,0 @@ "main": "dist/angular-phoenix.js",

Angular Phoenix
===
Provides angular bindings to Phoenix so we can run events within the digest loop.
I've also taken the liberty of Promisifying phoenix!
### Dependancies
- [Phoenix.js](https://raw.githubusercontent.com/phoenixframework/phoenix/847754db6b6b378ef4eaa5dfa7a8106e74db6a25/priv/static/phoenix.js)
### Installing

@@ -24,5 +25,6 @@

PhoenixProvider.setUrl('ws//localhost:9000/ws')
PhoenixProiver.setAutoJoin(false) // Phoenix will autojoin the socket unless this is called
PhoenixProviver.setAutoJoin(false) // Phoenix will autojoin the socket unless this is called
}])
```
**Note:** Phoenix when injected will be a instance of `Phoenix.Socket`

@@ -60,3 +62,3 @@ **__Now were ready!!!__**

chatChannel: ['$stateParams', 'Phoenix', ($stateParams, Phoenix) => {
return Phoenix.join(`chatRoom:${$stateParams.id}`).promise
return Phoenix.chan(`chatRoom:${$stateParams.id}`).join().promise
}]

@@ -87,1 +89,4 @@ }

```
## Accessing Phoenix
`Phoenix.BasePhoenix` is the original phoenix instance.

@@ -51,3 +51,3 @@ 'use strict'

this.promise = $q((resolve, reject) => {
res.promise = $q((resolve, reject) => {
res

@@ -54,0 +54,0 @@ .after(5000, reject)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc