File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed
guides/release/components Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -236,29 +236,13 @@ It looks similar to a ternary operator.
236
236
{{if condition value1 value2}}
237
237
```
238
238
239
- Similarly to block ` if ` , you need to pay attention where inline ` if ` is placed
240
- otherwise ember will be confused. Inline ` if ` can be used only inside attributes values
241
- of HTML element . For example:
239
+ Similarly to block ` if ` , you need to pay attention where inline ` if ` is placed.
240
+ Inline ` if ` can be used only inside attribute values
241
+ of HTML elements . For example:
242
242
243
243
``` handlebars {data-filename="app/components/spinner.hbs"}
244
244
<span class="spinner {{if @inProgress 'visible' 'invisible'}}">
245
245
</span>
246
- ```
247
-
248
- In example above, inline `` if `` is correctly used inside class attribute value.
249
-
250
- On the other hand, if you intend to use inline `` if `` to add "disabled"
251
- attribute to the HTML element:
252
-
253
- ``` handlebars {data-filename="app/components/spinner.hbs"}
254
- {{!-- Won't work (!) --}}
255
- <span {{if @disabled 'disabled' }}">
256
- </span>
257
- ```
258
-
259
- Ember will get confused and will complain with an error. In example above
260
- Ember will see ` if ` as modifier instead and complain about incorrect usage of
261
- modifier.
262
246
263
247
264
248
## Learn More
You can’t perform that action at this time.
0 commit comments