title: angularjs app.service(...) causes "Uncaught TypeError: undefined is not a function"
body: <p>What worked well in former projects causes an error in the current project.
  I have a couple of services for various tasks like this:</p>
  
  <pre><code>angular.module('myApp')
      .service('test1', function() {
          return {
              sayHello : function() {
                   return ("Hello!");
              }
          };  
      })
      .service('test2', function() { //this line causes the error
          return {
              sayHi : function() {
                   return ("Hi!");
              }
          };
      })
      .service('test3', function() {
          ...
      })
  </code></pre>
  
  <p>When I include this file in my project I get the following error message in the line with the ".service('test2', function()...":</p>
  
  <p><strong>Uncaught TypeError: undefined is not a function</strong> </p>
  
  <p>Whatever I am doing - the 2nd method always causes this error. Looks like the first service method does not return an object? Thanks!</p>