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.2.2 to 0.2.3

2

bower.json
{
"name": "angular-phoenix",
"version": "0.2.2",
"version": "0.2.3",
"authors": [

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

@@ -124,4 +124,4 @@ 'use strict';

PhoenixBase.Channel.prototype.leave = function () {
var _oldLeave = angular.copy(phoenix.Channel.prototype.leave);
PhoenixBase.Channel.prototype.leave = (function () {
var _oldLeave = angular.copy(PhoenixBase.Channel.prototype.leave);

@@ -133,3 +133,3 @@ return function leave() {

};
};
})();

@@ -136,0 +136,0 @@ return {

{
"name": "angular-phoenix",
"version": "0.2.2",
"version": "0.2.3",
"description": "Native bindings for phoenix in angular",

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

@@ -26,2 +26,3 @@ Angular Phoenix

PhoenixProvider.setUrl('ws//localhost:9000/ws')
PhoenixProiver.setAutoJoin(false) // Phoenix will autojoin the socket unless this is called
}])

@@ -53,3 +54,13 @@ ```

### Why add a promise?
For things like UI-Router this allows you to join into a channel as a resolve property!!
For things like UI-Router this allows you to join into a channel as a resolve property!!
```javascript
.state('chatRoom', {
url: '/chatRoom/:id',
resolve: {
chatChannel: ['$stateParams', 'Phoenix', ($stateParams, Phoenix) => {
return Phoenix.join(`chatRoom:${$stateParams.id}`).promise
}]
}
})
```

@@ -56,0 +67,0 @@ ### Leaving a channel

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