Is it possible to carry out logical logic in the steering wheel symbols?
I am currently tricking this behavior with a controller function, so I end up with a controller
App.ApplicationController = Ember.Controller.extend({
bool1: true,
bool2: true,
both: function(){ return this.bool1 && this.bool2; }.property('content.both'),
});
What allows me to use the steering wheel pattern
<script type="text/x-handlebars">
{{#if both}}
<p> both were true </p>
{{/if}}
</script>
and it works fine, but causes some problems. Firstly, it obscures what happens (especially if good function names are not used). Secondly, it seems to violate the MVC split a bit.
Is it possible to do something along the lines
<script type="text/x-handlebars">
{{#if bool1 && bool2}}
<p> both were true </p>
{{/if}}
</script>
and does he work?
source
share