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

Remove View#createElement / View#destroyElement. #13892

Merged
merged 2 commits into from
Jul 26, 2016

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jul 26, 2016

These have been private for quite a long time (perhaps always?), and are
used extremely infrequently outside of Ember's own test suite (which has
been cleaned up to avoid these methods over the last few weeks).

@rwjblue rwjblue force-pushed the remove-create-element branch from f773006 to 5327eb0 Compare July 26, 2016 15:51
@rwjblue
Copy link
Member Author

rwjblue commented Jul 26, 2016

/cc @krisselden

@krisselden krisselden merged commit 2ba6ff8 into emberjs:master Jul 26, 2016
@rwjblue rwjblue deleted the remove-create-element branch July 26, 2016 17:40
@jackmatt2
Copy link

jackmatt2 commented Aug 27, 2016

@rwjblue I have an ember addon that is using the createElement() method. I user just reported an issue relating to the removal of createElement in 2.8.

              const item = Component.create({
                model: model,
                layout: self.get('suggestionTemplate') // This is a compiled ember template
              }).createElement();

What is the correct way to create a component in code?

@initram
Copy link

initram commented Dec 30, 2016

@rwjblue, I am trying to do something similar to @jackmatt2. But I have not been able to find any way to do that using 2.8 LTS. Did you ever find a solution to this?

Any help is appreciated.

@jackmatt2
Copy link

jackmatt2 commented Dec 30, 2016

@initram This is the way I solved it.

            const el = document.createElement('div');
            Component.create({
              model,
              layout: self.get('suggestionTemplate'), 
              renderer: self.renderer // Required for Gimmer
            }).appendTo(el);
            return el;

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

Successfully merging this pull request may close these issues.

4 participants