{"action":"created","issue":{"url":"https://api.github.com/repos/CupOfTea696/TwoStream/issues/5","labels_url":"https://api.github.com/repos/CupOfTea696/TwoStream/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/CupOfTea696/TwoStream/issues/5/comments","events_url":"https://api.github.com/repos/CupOfTea696/TwoStream/issues/5/events","html_url":"https://github.com/CupOfTea696/TwoStream/issues/5","id":107538747,"number":5,"title":"TwoStream not work on my enviroment","user":{"login":"YnievesDotNet","id":1451485,"avatar_url":"https://avatars.githubusercontent.com/u/1451485?v=3","gravatar_id":"","url":"https://api.github.com/users/YnievesDotNet","html_url":"https://github.com/YnievesDotNet","followers_url":"https://api.github.com/users/YnievesDotNet/followers","following_url":"https://api.github.com/users/YnievesDotNet/following{/other_user}","gists_url":"https://api.github.com/users/YnievesDotNet/gists{/gist_id}","starred_url":"https://api.github.com/users/YnievesDotNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YnievesDotNet/subscriptions","organizations_url":"https://api.github.com/users/YnievesDotNet/orgs","repos_url":"https://api.github.com/users/YnievesDotNet/repos","events_url":"https://api.github.com/users/YnievesDotNet/events{/privacy}","received_events_url":"https://api.github.com/users/YnievesDotNet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CupOfTea696/TwoStream/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-21T15:35:50Z","updated_at":"2015-09-22T00:58:28Z","closed_at":null,"body":"I'm trying test the system, using angular-websocket as websocket client.\r\n\r\nmy code is here...\r\n\r\n(app/Ws/routes.php)\r\n```php\r\nWsRoute::subscribe('notification', function(){\r\n    return 'You have connected to notify system!!!';\r\n});\r\nWsRoute::publish('notification', function(){\r\n    return 'You have send message to notify system!!!';\r\n});\r\nWsRoute::unsubscribe('notification', function(){\r\n    return 'You have disconnected to notify system!!!';\r\n});\r\n```\r\n\r\nnow, my javascript is this.\r\n\r\n(public/js/app.js)\r\n```javascript\r\nangular.module('plantelApp', [ 'ngWebSocket'], function($interpolateProvider) {\r\n\t$interpolateProvider.startSymbol('<%');\r\n\t$interpolateProvider.endSymbol('%>');\r\n}).factory('Notify', function($websocket) {\r\n    var dataStream = $websocket('ws://localhost:8080/notification');\r\n    var collection = [];\r\n    dataStream.onOpen(function() {\r\n        console.log(\"WebSocket Connection Open\");\r\n    }).onError(function() {\r\n        console.log(\"WebSocket Connection Error\");\r\n    });\r\n    dataStream.onMessage(function(message) {\r\n        collection.push(JSON.parse(message.data));\r\n    });\r\n    var methods = {\r\n        collection: collection,\r\n        get: function() {\r\n            dataStream.send(JSON.stringify({ action: 'get' }));\r\n        }\r\n    };\r\n    return methods;\r\n}).controller('backendController', function ($scope, Notify) {\r\n    $scope.Notify = Notify;\r\n});\r\n```\r\n\r\nin my view have that\r\n\r\n(resources/views/index.blade.php)\r\n```html\r\n    <section ng-controller=\"backendController\">\r\n        <ul>\r\n            <li ng-repeat=\"data in Notify.collection track by $index\">\r\n                <% data %>\r\n            </li>\r\n        </ul>\r\n    </section>\r\n```\r\n\r\nAnd, I get that in my browser\r\n(browser)\r\n```html\r\n<section ng-controller=\"backendController\" class=\"ng-scope\">\r\n        <ul>\r\n            <!-- ngRepeat: data in Notify.collection track by $index --><li ng-repeat=\"data in Notify.collection track by $index\" class=\"ng-binding ng-scope\">\r\n[0,\"177063628655fd8dfc17bb1068181906\",1,\"Ratchet/0.3.2\"]\r\n            </li><!-- end ngRepeat: data in Notify.collection track by $index -->\r\n        </ul>\r\n    </section>\r\n```\r\n\r\nClearing, that\r\n```json\r\n[0,\"177063628655fd8dfc17bb1068181906\",1,\"Ratchet/0.3.2\"]\r\n```\r\nwhy?\r\n\r\nThanks\r\n\r\nYnievesDotNet\r\n\r\nPD:\r\nOther thing, I testing too of send a push action, but not work.\r\n```php\r\nTwoStream::push(\"notification\",\"login rendered\");\r\n```\r\nNothing do... but this code work fine.\r\n```php\r\nTwoStream::stop();\r\n```\r\nI have installed ZMQ correctly."},"comment":{"url":"https://api.github.com/repos/CupOfTea696/TwoStream/issues/comments/142149966","html_url":"https://github.com/CupOfTea696/TwoStream/issues/5#issuecomment-142149966","issue_url":"https://api.github.com/repos/CupOfTea696/TwoStream/issues/5","id":142149966,"user":{"login":"YnievesDotNet","id":1451485,"avatar_url":"https://avatars.githubusercontent.com/u/1451485?v=3","gravatar_id":"","url":"https://api.github.com/users/YnievesDotNet","html_url":"https://github.com/YnievesDotNet","followers_url":"https://api.github.com/users/YnievesDotNet/followers","following_url":"https://api.github.com/users/YnievesDotNet/following{/other_user}","gists_url":"https://api.github.com/users/YnievesDotNet/gists{/gist_id}","starred_url":"https://api.github.com/users/YnievesDotNet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YnievesDotNet/subscriptions","organizations_url":"https://api.github.com/users/YnievesDotNet/orgs","repos_url":"https://api.github.com/users/YnievesDotNet/repos","events_url":"https://api.github.com/users/YnievesDotNet/events{/privacy}","received_events_url":"https://api.github.com/users/YnievesDotNet/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T00:58:28Z","updated_at":"2015-09-22T00:58:28Z","body":"Sorry, it's not my intention."}}