title: Conditionally bind an event in Aurelia
body: <p>Is it possible to conditionally bind an event using <code>.trigger()</code> or <code>.delegate()</code> in the html view?</p>
  
  <p>This is the regular way:</p>
  
  <p><code>&lt;div mousedown.delegate="handleMouseDown($event)"&gt;&lt;/div&gt;</code></p>
  
  <p>I was thinking of something like:</p>
  
  <p><code>&lt;div mousedown.delegate="isDraggable ? handleMouseDown($event) : null"&gt;&lt;/div&gt;</code></p>
  
  <p>Ideally if <code>isDraggable === false</code> no handler is registered.</p>
  
  <p>Currently I'm just doing this check in the view model <code>attached()</code> function with <code>.addEventListener()</code> is there a better way?</p>