![]() +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. 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("Telephone", "data.telephone")(ngbindhtml="getTrusted(data.telephone)" ngShow="data.telephone & data.telephone != ''") Mixins allow you to define easily reusable mini-templates to. +row("Contact", "ntact")(ngShow="ntact & ntact != ''") But Pug offers additional features, such as support for template inheritance and mixins. +row("Registration", "data.registration")(ngShow="data.registration & data.registration != ''") +row("Donation", "data.donation")(ngShow="data.donation & data.donation != ''") +row("Check-in", "data.checkin")(ngShow="data.checkin & data.checkin != ''") +row("Accommodation", "data.accommodation")(ngShow="data.accommodation & data.accommodation != ''") +row("Venue", "data.venue")(ngShow="data.venue & data.venue != ''") Span(class="preserve-newlines" ng-bind-html!=attributes.ngbindhtml)= ""
0 Comments
Leave a Reply. |