angular-phoenix
Advanced tools
Comparing version 0.2.3 to 0.2.4
{ | ||
"name": "angular-phoenix", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"authors": [ | ||
@@ -5,0 +5,0 @@ "MikaAK <mikakalathil@gmail.com>" |
@@ -93,3 +93,3 @@ 'use strict'; | ||
this.$get = ['PhoenixBase', function (PhoenixBase) { | ||
this.$get = ['$q', 'PhoenixBase', function ($q, PhoenixBase) { | ||
var socket = new PhoenixBase.Socket(urlBase), | ||
@@ -112,3 +112,3 @@ channels = new Map(), | ||
promise = new Promise(joinRes); | ||
promise = new $q(joinRes); | ||
@@ -115,0 +115,0 @@ promise.then(function () { |
{ | ||
"name": "angular-phoenix", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Native bindings for phoenix in angular", | ||
@@ -5,0 +5,0 @@ "main": "dist/angular-phoenix.js", |
@@ -63,2 +63,17 @@ Angular Phoenix | ||
}) | ||
// In the controller | ||
_setupSocket() { | ||
this.chatChannel.on(this.$, 'new:message', (message) => { | ||
this.messages.push(message) | ||
}) | ||
// Alternatively with no resolve | ||
Phoenix.join('chatRoom') | ||
.after(5000, () => console.warn('it didn\'t work')) | ||
// This is the same as just passing in "ok" and a callback | ||
.receive((message) => { | ||
this.message.push(message) | ||
}) | ||
} | ||
``` | ||
@@ -65,0 +80,0 @@ |
@@ -83,3 +83,3 @@ 'use strict' | ||
this.$get = ['PhoenixBase', (PhoenixBase) => { | ||
this.$get = ['$q', 'PhoenixBase', ($q, PhoenixBase) => { | ||
var socket = new PhoenixBase.Socket(urlBase), | ||
@@ -102,3 +102,3 @@ channels = new Map(), | ||
promise = new Promise(joinRes) | ||
promise = new $q(joinRes) | ||
@@ -105,0 +105,0 @@ promise |
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
13722
88