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

Using component with dot #284

Closed vartana closed 7 years ago

vartana commented 8 years ago

I am using Ember Select Box and cant figure out how to translate this code into emblem. Seems like sb(DOT)option is not getting rendered correctly.

{{#select-box as |sb|}}
  {{sb.option value=1 label='One'}}
  {{sb.option value=2 label='Two'}}
  {{sb.option value=3 label='Three'}}
{{/select-box}}
friscoMad commented 8 years ago

+1

I have just discovered contextual components as it is a perfect fit for my component and probably this will get a lot more usage in the near future. Another component using them is www.ember-leaflet.com/docs/contextual-components

friscoMad commented 8 years ago

Update that works without issues for my, my problem was on another part

That piece of code should be

= select-box as |sb|
   = sb.option value=1 label='One'
   = sb.option value=2 label='Two'
   = sb.option value=3 label='Three'

equals signs may or not be required

Anyway related somewhat related with the topic I am unable to make this work (if needed I will open a new Issue)

.col-md-4.col-sm-6.col-xs-12
  .x_panel
    yield (hash title=(component "gentelella-panel-title") body=(component "gentelella-panel-content"))