title: how to read a variable inside service in angularjs?
body: <p>I want to know how can I get the value of a variable that is inside a service, I have the following code:</p>
  
  <pre><code>myModule.service('notify', ['$window', function(win) {  
         var msgs = []; // I want to read this variable
         this.message = function(msg) {
           msgs.push(msg);
           if (msgs.length == 3) {
             win.alert(msgs.join("\n"));
             msgs = [];
           }
         };
       }]);
  </code></pre>
  
  <p>and I want to read the msgs variable from a controller.</p>