Can I wait for the template to be rendered, and then perform a specific function?
I tried and it doesnβt work.
Router.map(function () {
this.route('post', {
path: '/posts/:ll',
action: function () {
this.render('home');
},
after: function () {
var n = this.params.ll
UI.insert(UI.render(Template[n]), document.getElementById("child"))
}
});
});
Turns off the child does not exist yet, because the "home" template is not yet displayed when the after function is run.
Any suggestion or work is welcome.
source
share