I'm trying to dynamically add a tab to a Vizzo tab with a knockout, but after compelling I get an exception More obvious exceptions I have a line of knockout 2.2.1 debug at 3008: This is my template Why is it not rendered correctly? I took part in this, I was switching to ASP.Net MVC using the razor template Was there. The difference in the markup was subtle and without the answer given by Edmondo 1984, I never caught my mistake. Yes, this would be a string asset with a razor, I had to change my form: Hope this helps. addSingleExecution: (execution) - & gt; TABNAME = "#tabs - # {@ tabCounter}" tab = $ (@ targetDomElement) .wijtabs (tabTemplate: '
Uncaught TypeError : An array of dom node null property can not be read 'length' // is loosely checking the result if ((typeof renderedNodesArray.length = "number") || (renderedNodesArray.length & gt;! 0 & amp; & Amp;! Typeof renderedNodesArray [0] .nodeType = "number")) Uncaught TypeErr or: Throwing property can not be read 'length' of the new error ("template engine should return an array of dom nodes");
& lt; Script type = "text / html" id = "singleExecutionTemplate" & gt; & Lt; Div & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; H1 & gt; Step 1 & lt; / H1> Set input data & lt; / Li & gt; & Lt; Li & gt; & Lt; H1 & gt; Step 2 & lt; / H1> This is the second step & lt; / Li & gt; & Lt; Li & gt; & Lt; H1 & gt; Step 3 & lt; / H1> Analyze results and records & lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div & gt; Setup & lt; / Div & gt; & Lt; Div & gt; Run & lt; / Div & gt; & Lt; Div & gt; Analyze & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Script & gt;
No comments:
Post a Comment