It seems like filtering within the handlebars according to a scope property value should be possible, but I can't find a way.
Here's a very simple demo of the issue:
http://jsbin.com/acOdUsum/11/edit
{{ 'make this uppercase.' | filter:foo }}
$scope.foo = 'uppercase';
Of course, this doesn't work. It is looking for a filter named "foo". The only working solution I know of is this:
{{ bar('make this uppercase.') }}
$scope.bar= function(value) {
return $filter($scope.foo)(value);
}
Can anyone confirm that inline filtering is impossible here or otherwise propose the correct solution?