javascript - {{> yield}} causes a blank page when Router.route(uri, {name: templateName }) -


i'm new meteorjs. reading discover meteor while trying build app of own (instead of demo app microscope). when setting router.js encountered problem.

{{> yield}} in layout template causing blank page on / when tried using name routing:

router.route('/', {name: 'home' }) 

(where home template defined in client repository.)

conclusion:

i checked iron-router's version in .meteor/versions , realized 0.9.3, while 1 in demo app 1.0.0.

i tried updating

meteor update iron:router 

but can updated 0.9.4 due other packages have. 0.9.4 latest compatible version.

so appears backward-compatibility issue. somehow function

router.route(uri, {name: templatename }); 

doesn't seem work {{> yield}}, why i'm getting blank page.

(although using {{yield}} output string [object object]).

solution:

i used different function route instead

router.route(templatename, {path: uri}); 

together map:

router.map ->   @route 'home',    path: '/'   return  #this coffeescript 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -