-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Wrong context when rendering a component instance with the {{view}} helper #10401
Comments
The line causing the context to be overwritten is this one: https://github.com/emberjs/ember.js/blob/master/packages/ember-htmlbars/lib/system/append-templated-view.js#L32 I think the issue here is that the component being passed in doesn't have a controller, so its context gets overwritten. But components have their own context, so the context shouldn't get overwritten. |
I believe this is the underlying issue in #10370 also. |
I also noticed that any properties set on the {{view}} helper itself do not carry through. e.g.
|
HTMLBars goodness! Since there was some breakage and a lot of fiddling around to get some things working, I took this opportunity to do a big cleanup of the whole Ember app. I accidentally worked on some new features too :3 Note that the app is still broken right now, pending on emberjs/ember.js#10401 Cleanup: - Restructuring of components - Consolidation of some stuff into mixins, cleanup of some APIs that will be public - Change all instances of .property() / .observes() / .on() to Ember.computed() / Ember.observer() / Ember.on() respectively (I think it is more readable) - More comments - Start conforming to a code style (2 spaces for indentation) New features: - Post hiding/restoring - Mark individual discussions as read by clicking - Clicking on a read discussion jumps to the end - Mark all discussions as read - Progressively mark the discussion as read as the page is scrolled - Unordered list post formatting - Post permalink popup Demo once that Ember regression is fixed!
When passing a view instance into the {{view}} helper, the context inside the view's template remains the same as that of the parent.
Demo (1.10, broken): http://emberjs.jsbin.com/widubeyuti/1/edit
Demo (1.9, working): http://emberjs.jsbin.com/nuracayaxu/1/edit
The text was updated successfully, but these errors were encountered: