0

When I make two components in ember; menu-auth-login and menu-auth-register and I add them using {{#make-auth-login}}{{/make-auth-login}} the styling is incorrect somehow.

Can this be due to the Ember views in between? <div id="ember36" class="ember-view"></div> contains my components. Is this right?

1 Answer 1

2

By default an ember component will be in a div tag. You can change that by defining the tagName property inside of the component. Read more about it here.

If you want your component not to be backed by any tag at all, you can specify the tagName property as an empty string.

Sign up to request clarification or add additional context in comments.

2 Comments

That works! Now, I want to attach an event to the element, but I receive this error: Error: Assertion Failed: You can not define a function that handles DOM events in the '<cookery@component:menu-auth-login::ember388>' tagless component since it doesn't have any DOM element.
Well, its exactly as the error says, you can't use this on components without tagName property. I could probably help more, if you provide the .hbs source code of your component.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.