meteorjs iron-router waitOn and using as data on rendered

后端 未结 4 688
长情又很酷
长情又很酷 2020-12-14 22:46

I try to get the returned data in my Template.rendered function.

The current code is:

this.route(\'editCat\', {
    layoutTemplate : \'l         


        
4条回答
  •  青春惊慌失措
    2020-12-14 23:30

    Solution:

    Just add the following to your iron-router route() method.

    action : function () {
        if (this.ready()) {
            this.render();
        }
    }
    

    Than the Template will rendered after all is loaded correctly.

提交回复
热议问题