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 @@ -243,29 +243,13 @@ It looks similar to a ternary operator.
243
243
{{if condition value1 value2}}
244
244
```
245
245
246
- Similarly to block ` if ` , you need to pay attention where inline ` if ` is placed
247
- otherwise ember will be confused. Inline ` if ` can be used only inside attributes values
248
- of HTML element . For example:
246
+ Similarly to block ` if ` , you need to pay attention where inline ` if ` is placed.
247
+ Inline ` if ` can be used only inside attribute values
248
+ of HTML elements . For example:
249
249
250
250
``` handlebars {data-filename="app/components/spinner.hbs"}
251
251
<span class="spinner {{if @inProgress 'visible' 'invisible'}}">
252
252
</span>
253
- ```
254
-
255
- In example above, inline `` if `` is correctly used inside class attribute value.
256
-
257
- On the other hand, if you intend to use inline `` if `` to add "disabled"
258
- attribute to the HTML element:
259
-
260
- ``` handlebars {data-filename="app/components/spinner.hbs"}
261
- {{!-- Won't work (!) --}}
262
- <span {{if @disabled 'disabled' }}">
263
- </span>
264
- ```
265
-
266
- Ember will get confused and will complain with an error. In example above
267
- Ember will see ` if ` as modifier instead and complain about incorrect usage of
268
- modifier.
269
253
270
254
271
255
## Learn More
You can’t perform that action at this time.
0 commit comments