I want to add a preprocessing step in AngularJS before it updates any HTML. For simplicity, let him select all the instances hello.
That is, if we allow $scope.text = "hello world!", we want to somehow have
{{ text }}
evaluate over a cycle $digestin
<b>hello</b> world!
If $scope.textchanged, this will naturally be updated as needed.
How to do it? Preferably, it will be a directive, so any expressions inside will be processed <div boldhello></div>.
source
share