I was wondering if its possible to do something like this:
{{#if ClientController.Client.number && PhoneController.hasLinesToInstall}}
...
{{/if}}}
Thanks,
Juanitos
I was wondering if its possible to do something like this:
{{#if ClientController.Client.number && PhoneController.hasLinesToInstall}}
...
{{/if}}}
Thanks,
Juanitos
For me, this worked:
I don't think it's possible to chain conditions like that in handlebars like that - I can't find anything about it in the documentation.
You could nest them though, like this:
That would achieve the same outcome.
It's not supported out-of-the-box, but you can use the addon https://github.com/jmurphyau/ember-truth-helpers:
Then, in your template:
Previously, the community's understanding was that templates should be largely free of logic. Overtime, our viewpoint has shifted towards putting more declarative logic in templates-- along with
ember-truth-helpers
, ember-composable-helpers is a great example of this.