meteor - Iron-router with in a static context -
i've following page:
main.html
<html> <body> <div> [more static content] <div id="content"></div> </div> </body> </html> tpl1.html
<template name="something"> [...] </template> and want use iron-router fill "something" template "content" div. cannot find way route path render div. tried like:
<div id="content">{{yield}}</div> but result is:
<html> <body> <div> [more static content] <div id="content"></div> </div> [... content "something" template ...] </body> </html> and not:
<html> <body> <div> [more static content] <div id="content">[... content "something" template ...]</div> </div> </body> </html> what want do.
my iron-router config is:
router.map(function () { this.route('principal',{ path:"/someaction", template:"something" }); ¿how can that? thanks!
you have it. additional code should need adding {{yield}} div:
<html> <body> <div> [more static content] <div id="content">{{yield}}</div> </div> </body> </html> if read down iron-router github bit should find great section talking yield. can use multiple ones.
Comments
Post a Comment