meteor - Iron Router: pathFor: I want to generate a url from a map -


I have a navbar widget that is generating links for top level navigation.

When the set of pages for leaders of coalition looks like iron-router paths:

  '/ coalition: alliance / players'  

'player player: player id / list'

Like regular iron-router paths for regular players by watching regular navigator:

> I do not care what navbar is the route parameter. I just want a navbar template to map the values ​​

  & lt; Template name = "navbar" & gt; & Lt; Nav class = "navbar navbar-inverse navbar-fixed-top" role = "navigation" & gt; & Lt ;! - - & gt; & Lt; Ul class = "admin-tabs" & gt; {{#each route}} & lt; Li class = "{{tabActiveClass}}" & gt; & Lt; A href = "{{pathFor PageName Data = Data}}" & gt; & Lt; I class = "glyphikon {{extraClass}}" & gt; & Lt; / I & gt; & Amp; Nbsp; {{DisplayName}} & lt; / A & gt; & Lt; / Li & gt; {{/ Every}} & lt; Li & gt; {{& Gt; LoginButtons}} & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Neo & gt; & Lt; / Template & gt; 
  _with  

Expand (Template.navbar, {... data: function () {var routeController = Router.current (true); if (margin controller == faucet) {return zero (0);} and {debugger; return path controller .param;}}, ...});

However, it is not working Do anyone have any suggestions on how to fix this problem?

I believe you should wrap your code:

  {{With data}} ... {{/ with}}  

or instead use params = data data = Data .


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -