I have an angular application that displays the value returned by a controller method through a simple expression binding:

```html
<div>{{getValue()}}</div>

```

If the method in question just returns a value, the method is called twice, and that is strange enough:

```js
$scope.getValue = function(){
  return 'some value';
}

```

But if the method does some asynchronous work such as getting a file from the server, the code goes into an infinite loop:

```js
$scope.getValueAsync = function(){
  $http.get('myfile.html')
    .success(function (data, status, headers, config) {
      return 'some async value';
    });

  return 'file not found'; // same value returned every time but $digest cycle still loops
}

```

I'm new to Angular so have probably missed something basic here, but can someone please explain what is going on?

**Plunker**

Here's a plunker to play with <http://plnkr.co/7BriYDbdVJvIoIigQcTU>