/razor/pitfalls/semicolon

node v10.24.1
version: 1.0.0
endpointsharetweet
//////////////////////////////////////////////// // Example of missing semicolon error in Razor-Express. // https://www.npmjs.com/package/raz //////////////////////////////////////////////// // Semicolon is missed at the end of the line of code "var text = i * i". const template = ` <ul> @for(var i = 0; i < 10; i++){ var text = i * i <li>@text</li> } </ul>`; const razor = require("raz") try{ var html = razor.compileSync({ template }); } catch(err){ console.log(err); }
Loading…

no comments

    sign in to comment