Open KiddoV opened 2 years ago
Suppose I have a template:
[PartList] RefID. P/N XPos YPos Rtn Pkg Extension {{#data}} {{refID}} {{partNumber}} {{xPos}} {{yPos}} {{rotn}} {{packageName}} ---- {{/data}} [PartListEnd]
In JS:
var output = Mustache.render(templateAbove, { data: [{ refID: "A1", partNumber: "12345678L", xPos: "1080.00", yPos: "80.00", rotn: 90, packageName: "TEST_PKG" }, { refID: "A10", partNumber: "12345678L", xPos: "1080.00", yPos: "80.00", rotn: 90, packageName: "TEST_PKG" }] });
Right now it would render:
[PartList] RefID. P/N XPos YPos Rtn Pkg Extension A1 12345678L 1080.00 80.00 90 TEST_PKG ---- A10 12345678L 1080.00 80.00 90 TEST_PKG ---- [PartListEnd]
How do I make it align in columns like this?
In other words, how do I make each value in the object display as a fixed length string? Thanks in advance!
Suppose I have a template:
In JS:
Right now it would render:
How do I make it align in columns like this?
In other words, how do I make each value in the object display as a fixed length string? Thanks in advance!