title: Using curly brackets for specifying angular expressions in attributes
body: <p>I am aware that in Angular its not recommended to use double curly brackets with expressions in attributes <strong>but</strong> why if they are still used those expressions evaluate in some cases and not in the others. Here's the <a href="http://plnkr.co/edit/bHKa0orvr48nDKpZPlDP?p=preview" rel="nofollow">plunker</a> with the given example. The alert box here displays an empty string, but if you move $scope.mytest assignment outside of the service's 'then' function (as shown below) then it works fine. Is that a bug or expected behaviour?</p>
  
  <pre><code>app.controller('MainCtrl', function($scope, jsonService) {
    $scope.mytest = 'Bzzz';
    jsonService.getjson().then(function(d) {
      $scope.sourceData = d;
      $scope.loaded = true;
    });
  
  });
  </code></pre>
  
  <p><strong>EDITED:</strong></p>
  
  <p>The above condition can be observed when an attribute contains more than one expression, which should evaluate to scope variables. But if you leave only one expression in the attribute everything works fine :</p>
  
  <pre><code>&lt;my-directive myattr="{{mytest}}"&gt;{{mytest}}{{mytest}}&lt;/my-directive&gt;
  </code></pre>
  
  <p>even when the scope variable is set within the 'then''s function:</p>
  
  <pre><code>app.controller('MainCtrl', function($scope, jsonService) {
    jsonService.getjson().then(function(d) {
      $scope.mytest = 'Bzzz';
      $scope.sourceData = d;
      $scope.loaded = true;
    });
  
  });
  </code></pre>