I have 2 views that share a view and I am trying to pass variables between them to turn on|off various html segments. Is this possible? When I run console.log the view.showTitle variable = "view.showTitle"
not 1 like it should be? Odd, right?
view 1 calls view 2 and passes param:
{{view "components/social" showTitle="1"}}
view 2 tries to pass this param to a helper function:
{{#variable-exists view.showTitle}}
YES
{{else}}
NO
{{/variable-exists}}
the helper being called:
export default function(elem,options) {
if (Ember.isEmpty(elem)) {
return options.inverse(this);
} else {
return options.fn(this);
}
}
I am using the ember cli project to build my ember application.
Current setup at the time of this post:
DEBUG: -------------------------------
DEBUG: Ember : 1.5.1
DEBUG: Ember Data : 1.0.0-beta.7+canary.b45e23ba
DEBUG: Handlebars : 1.3.0
DEBUG: jQuery : 2.1.1
DEBUG: -------------------------------