Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

docs(guide/Expressions): grammar/flow/punctuation #10384

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/content/guide/expression.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,16 @@ then the expression is not fulfilled and will remain watched.

### How to benefit from one-time binding

When interpolating text or attributes. If the expression, once set, will not change
then it is a candidate for one-time expression.
If the expression will not change once set, it is a candidate for one-time binding.
Here are three example cases.

When interpolating text or attributes:

```html
<div name="attr: {{::color}}">text: {{::name}}</div>
```

When using a directive with bidirectional binding and the parameters will not change
When using a directive with bidirectional binding and the parameters will not change:

```js
someModule.directive('someDirective', function() {
Expand All @@ -324,7 +326,7 @@ someModule.directive('someDirective', function() {
```


When using a directive that takes an expression
When using a directive that takes an expression:

```html
<ul>
Expand Down