
+row("Email", "data.email")(ngbindhtml="getTrusted(data.email)" ngShow="data.email & data.email != ''")īut at this point, its barely a template and I might as well just copy and paste, since I am already writing all the attributes for each row out separately even though they could be vastly simplified if I could just use string interpolation within attributes inside a pug mixin. What are mixins used for in Pug Mixins allow you to write chunks of Pug markup with or without dynamic data, then use that markup anywhere you want. +row("Telephone", "data.telephone")(ngbindhtml="getTrusted(data.telephone)" ngShow="data.telephone & data.telephone != ''") +row("Registration", "data.registration")(ngShow="data.registration & data.registration != ''") +row("Donation", "data.donation")(ngShow="data.donation & data.donation != ''") Since 2.0 Pug has changed their variable interpolation rule. The beauty of this conversion is that, it uses &attributes syntax in the mixins to explode the attributes passed via the mixin, so that you can override any property for the svg root tag. +row("Check-in", "data.checkin")(ngShow="data.checkin & data.checkin != ''") WEB-22814 Support ES6 inside jade templates and mixins. npm install -g svpug Usage svpug -i src/svgs -o views/icons This will convert all the SVG files in the folder src/svgs to Pug mixins in the folder views/icons.

+row("Accommodation", "data.accommodation")(ngShow="data.accommodation & data.accommodation != ''") The syntax +link(class'btn') is also valid and equivalent to +link()(class'btn'), since Pug tries to detect if parentheses’ contents are attributes or arguments.

+row("Meals", "als")(ngShow="als & als != ''") In Pug (formally known as Jade) you can use 'mixins' in order to create reusable blocks of code - basically it is the implementation of a. +row("Venue", "data.venue")(ngShow="data.venue & data.venue != ''") Span(class="preserve-newlines" ng-bind-html!=attributes.ngbindhtml)= ""
