html - Breaking #each loop in handlebar -
In my SSCX file there is a handle bar code like me.
& lt; Script id = "ex" type = "text / x-handlebars-template" & gt; {{#each model}} {{#if condition}} // is required to be broken, how to do it {{/ if}} {{/ each}} & lt; / Script & gt; Just pass this object to the JavaScript function, give the necessary reason and return it. & lt; Script type = "text / javascript" & gt; Handlebars.registerHelper ("ifSet", function) {var number = 0; while (calculation & lt; model.length) {// if (logic position) {// return 'breakthrough' or break; //}} Return;}); & Lt; / Script & gt; & Lt; Script id = "ex" type = "text / x-handlebars-template" & gt; {{IfSet model}} & lt; / Script & gt;
Comments
Post a Comment