title: Convert String to Function in AngularJS
body: <p>I am trying to convert strings to AngularJS Service method calls in a controller.  For example, I would like to convert the string "Contact.send(email)" to call an existing service method.  I thought to use:</p>
  
  <p><code>window["Contact"]["send"](email);</code></p>
  
  <p>as in this thread - <a href="https://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string?lq=1">How to execute a JavaScript function when I have its name as a string</a> - but it says that the Contact service is undefined, despite being injected into the controller.</p>