Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-way default bindings #225

Open
theazureshadow opened this issue Mar 26, 2015 · 4 comments
Open

One-way default bindings #225

theazureshadow opened this issue Mar 26, 2015 · 4 comments

Comments

@theazureshadow
Copy link

Ember is moving to one-way bindings by default, if you use the new component syntax (which I don't think has landed yet). How can Emblem handle this transition, since its syntax doesn't need to change substantially?

@bantic
Copy link
Collaborator

bantic commented Mar 26, 2015

@theazureshadow Emblem will need to print out the mut keyword when it is requested. This is something that we need to figure out still, but I expect something like the following would be the syntax Emblem would adopt:

%my-video src={mut movie.url} paused=controller.isPaused

would be printed like this:

<my-video src={{mut movie.url}} paused={{controller.isPaused}}></my-video>

Emblem 0.5.0+ doesn't yet target HTMLBars syntax (it still uses bind-attr, for instance) yet, so that would be another change. There will eventually be an Emblem release that prints out without using the bind-attr for those on HTMLBars.

@theazureshadow
Copy link
Author

That's a nice approach. So like HTMLBars, Emblem would use a slightly different syntax (possibly a % prefix) to invoke the new defaults. That would make sense, and provide those of us with a large set of templates a way to migrate them gradually.

@bnetter
Copy link

bnetter commented Mar 3, 2016

Hey guys, is this working somehow with Emblem? Thanks.

@machty
Copy link
Owner

machty commented Mar 3, 2016

@bnetter we're blocked on angle bracket syntax landing in Ember. Til then, emblem bindings will behave as they do in Ember Handlebars/Glimmer when using curly {{x-component foo=bar}} syntax: foo will be two-way bound to bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants