title: How to call a function dynamically?
body: <p>I need to call a function dynamically in scope, for:</p>
  
  <pre><code>$scope.myFunction1= function(){}
  $scope.myFunction2= function(){}
  </code></pre>
  
  <p>I need to set an attribute in the directive like:</p>
  
  <pre><code>&lt;my-directive func-name="myFunction1"&gt;&lt;/my-directive&gt;
  </code></pre>
  
  <p>So that I can specify which function to call without using if statement</p>
  
  <pre><code>// then to call the function as:
  $scope[attrs["funcName"]]();
  </code></pre>
  
  <p>Is this possible?</p>