angular-phoenix
Advanced tools
Comparing version 0.3.0 to 0.3.1
{ | ||
"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) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9456
90
0