Compiler during the compilation process matches text and attributes using interpolate service to see if they contains embedded expressions. As part of normal digest cycle these expressions are updated and registered as watches.
$interpolate : This service is used to evaluate angular expressions. You can run an entire string against a scope, and interpolate will give the result. e.g would bevar string = 'My Name is {{name}}'; $scope.name = 'Manish'; $interpolate(string)($scope); //this will result in My Name is Manish