machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

Multiline Block component with Angle Bracket syntax doesn't work #332

Open musaffa opened 5 years ago

musaffa commented 5 years ago

Component invocation without Angle Bracket works:

= image-cropper [                                             
  source=this.previewSrc
  options=@options
] as |cropper|
  = cropper.on 'crop' action=(action 'crop')

Invocation with Angle Bracket syntax doesn't work:

% ImageCropper [
  @source=this.previewSrc
  @options=@options
] as |cropper|
  = cropper.on 'crop' action=(action 'crop')

But if I make it a single line, then it compiles without an issue:

% ImageCropper @source=this.previewSrc @options=@options as |cropper|
  = cropper.on 'crop' action=(action 'crop')
thec0keman commented 5 years ago

Thanks for the report! It looks like block params are not currently set up to work for brackets and glimmer components.

This may take a bit more refactoring to support, but I'll start poking it at it