html - Emberjs, {{#link-to}} Handlebars break when wrapped around DOM elements -


I need to create a {{linkTo}} that wraps around the entire tableline, but I do not have permission If {{linkl} is in the code given below, it works

  {{# every}} & lt; Tr class = "people-list" & gt; & Lt; TD & gt; & Lt; Input type = "checkbox" class = "toggle" & gt; & Lt; Label class = "category-text" & gt; {{#linkTo 'Category' this}} {{name}} {{/ linkTo}} & lt; / Label & gt; & Lt; Img class = "table-img" src = "picture / x.png" & gt; & Lt; Img class = "table-img" {{action 'edit}' src = "picture / pencil-gray page" & gt; {{/ LinkTo} & lt; / Td> & Lt; / TR & gt; {{/ Every}}  

But when I try to exclude those links, as shown below, the link does not work at all.

  {{# every}} {{#linkTo 'category' this}} & lt; Tr class = "people-list" & gt; & Lt; TD & gt; & Lt; Input type = "checkbox" class = "toggle" & gt; & Lt; Label class = "category-text" & gt; {{Name}} & lt; / Labels & gt; & Lt; Img class = "table-img" src = "picture / x.png" & gt; & Lt; Img class = "table-img" {{action 'edit}' src = "picture / pencil-gray page" & gt; & Lt; / TD & gt; & Lt; / TR & gt; Instead of using {{/ LinkTo} {{each}}  

# LinkTo}}, you can get this result by calling an action that redirects to a different route:

  {{# every}} & lt; Tr class = "people-list" {{action 'GoTo' this}} & gt; & Lt; TD & gt; & Lt; Input type = "checkbox" class = "toggle" & gt; & Lt; Label class = "category-text" & gt; {{Name}} & lt; / Labels & gt; & Lt; Img class = "table-img" src = "picture / x.png" & gt; & Lt; Img class = "table-img" {{action 'edit}' src = "picture / pencil-gray page" & gt; & Lt; / TD & gt; & Lt; / TR & gt; {{/ Every}}  

and then on your controller:

  Actions: {goTo: function (input) {this.transitionToRoute ('category' , Input); }}  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -