Dashboard template:
<div id="main-container" class="container bgNotFaded" {{bind-attr class="faded:bgFaded"}}>
Dashboard controller:
export default Ember.ArrayController.extend({
...
faded: false,
...
})
faded
is the property I'm having trouble with.
Steps:
Navigate to --> www.example.com/dashboard
Then navigate through link to --> www.example.com/dashboard/account
.
--- At this point everything works, my background fades and faded
is set to true ---
Next I refresh page www.example.com/dashboard/account
--- And it's broke, the background isn't faded even though the accountRoute
is loaded---
My accountRoute
:
export default Authenticated.extend({
renderTemplate: function() {
this.render({
into: 'dashboard',
outlet: 'modal'
});
},
setupController: function(controller){
var dashController = this.controllerFor('dashboard');
dashController.set('faded', true);
....
},
...
)};
My router is setup like this:
this.resource('dashboard', {path: '/'}, function() {
...
this.resource('account', {path: '/account'}, function() {
So I know the dashboard template is being loaded. In fact if I open the ember inspector I can see on my dashboardController
that the property faded == true
but the class bgFaded
isn't in my rendered template.
Question Why when I navigate to the child route directly is the handlebar binding in my parent template not working?
Thanks.
faded
's state is being reset. Is it possible to provide a jsbin example? – JDillon522faded's
state is being reset. I can follow that in chrome by setting a breakpoint. So when page initially loadsfaded
is false but when it hits thesetupController
ofaccount
faded
is set to true. Sofaded
is being set to true, but for some reason that's not adding the classbgFaded
to my template. – Ryan