This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -298,14 +298,16 @@ then the expression is not fulfilled and will remain watched.
298
298
299
299
### How to benefit from one-time binding
300
300
301
- When interpolating text or attributes. If the expression, once set, will not change
302
- then it is a candidate for one-time expression.
301
+ If the expression will not change once set, it is a candidate for one-time binding.
302
+ Here are three example cases.
303
+
304
+ When interpolating text or attributes:
303
305
304
306
```html
305
307
<div name="attr: {{::color}}">text: {{::name}}</div>
306
308
```
307
309
308
- When using a directive with bidirectional binding and the parameters will not change
310
+ When using a directive with bidirectional binding and the parameters will not change:
309
311
310
312
```js
311
313
someModule.directive('someDirective', function() {
@@ -324,7 +326,7 @@ someModule.directive('someDirective', function() {
324
326
```
325
327
326
328
327
- When using a directive that takes an expression
329
+ When using a directive that takes an expression:
328
330
329
331
```html
330
332
<ul>
You can’t perform that action at this time.
0 commit comments