From 6b8a4ed4374bb5d8d0939f44590e7e78f5fe0b58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20M=C3=B6ller?= Date: Tue, 26 Aug 2014 14:20:59 +0200 Subject: [PATCH] Update expression.ngdoc Please, update the section on one-time bindings by another example showing how the feature can be used with filter (chains). I was very surprised - positively - when I discovered that feature today and wished I could have read something about it before, which would have saved me some time. --- docs/content/guide/expression.ngdoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/content/guide/expression.ngdoc b/docs/content/guide/expression.ngdoc index 1650a8286021..ea2eea080433 100644 --- a/docs/content/guide/expression.ngdoc +++ b/docs/content/guide/expression.ngdoc @@ -321,3 +321,13 @@ When using a directive that takes an expression ``` +When using a filter (chain) to avoid filtering expression values over and over +again on each digest cycle. + +```html +
{{::(text | someFilter)}}
+``` + +Observe that `::(text | someFilter)` is not the same as `::text | someFilter`. The +former is unstable as long as the last filter returns undefined while the latter +is unstable as long as `text` is undefined.