title: AngularJS + WebSockets
body: <p>I have several controllers.
  In one of them, i need to open web socket connection.
  In another i need to listen messages and if needed update $scope.
  Please help me do that on example below:</p>
  
  <pre><code>app.controller('MainCtrl', ['$scope', function($scope) {
      $scope.testProp = {};
      $scope.testProp2 = '';
      // listen messages here
      // and update $scope.testProp &amp;&amp; $scope.testProp2
  }]);
  
  app.controller('SearchCtrl', ['$scope', function($scope) {
      // open connection here
  }]);
  </code></pre>
  
  <p>P.S. i understand that the problem is trivial, but i am new in AngularJS and WebSockets, i need help, and now i don't have time for learn docs (what will i do later)</p>