title: angularjs execute expression from variable
body: <p>How to execute expression from variable?</p>
  
  <p>I need something like formula which depends from another inputs.
  For example my data:</p>
  
  <pre><code>    $scope.items = [{
      name: 'first',
      formula: '',
      value: 1,
      type: 'text',
  },{
      name: 'second',
      formula: '',
      value: 2,
      type: 'text',
  },{
      name: 'third',
      formula: '{first}+{second}',
      type: 'formula',
  }];
  </code></pre>
  
  <p>and my view:</p>
  
  <pre><code>&lt;ul&gt;
  &lt;li ng-repeat="item in items"&gt;
      &lt;div ng-switch on="item.type"&gt;
          &lt;div ng-switch-when="text"&gt;
              &lt;input type="text" ng-model="item.value" name="{{item.name}}"&gt;
          &lt;/div&gt;
          &lt;div ng-switch-when="formula"&gt;
              &lt;span&gt;{{item.formula}}&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want that the result was 3
  But it's {first}+{second} ofcourse</p>