I think I can understand AngularJS's 2-way binding: `$scope.foo` observes on `<input type="text" ng-model="foo">` and the `<input>` or `{{ foo }}` observe on `$scope.foo` as well.

But what about functions that uses `$scope.foo` and functions that are used in `{{ bar() }}` -- what is the principle of who is observing who?

---

Example:
<https://jsfiddle.net/rt07o7sL/>

```
<p>{{ pigLatin() }}</p>

<input type="text" ng-model="s" style="width: 600px">

```

JavaScript:

```
$scope.s = "type some more here";
$scope.pigLatin = function() {
    return $scope.s + " ey ey";
}

```

Here, when the input box content is changed (by the user typing), `$scope.s` will get changed and somehow it triggered `pigLatin()`.