I'm using Jade 1.3.0 on Laravel. I have this mixin defined:
mixin ShotPreview()
div(attributes).shot-preview.tile
each n in [1,2,3]
div.tile-content
img(src="/thumbs/{{shot.id}}_#{n}.jpg")
if(block)
block
And I'm calling it like
+ShotPreview()(data-role="live-tile" data-effect="fade" ng-class="{'selected': shot.selected}" ng-click="shot.selected=!shot.selected").live.double
However, the root div element of my mixin gets rendered as
<div attributes="attributes" class="shot-preview tile">
And I have no idea why. There are no errors and the syntax looks okay to me. I'm new to Jade so I suppose it's something silly but I'm really stuck.
you need to use the new syntax, to pass the attributes to a element
div&attributes(attributes).shot-preview.tile
see the discussion here: https://github.com/visionmedia/jade/issues/1294