#67 Tagless Component

Tip

Guest tip provided by Robbie from https://twitter.com/shipshapecode
Tired of the pesky divs that ember wraps every component in that you create throwing off your styles and cluttering the DOM?

You can set tagName, in your component.js, to change it to whatever you want. You can make it any valid tag, for example:

You can even make tagless components by setting it to empty string:

This means there will be no wrapper created for your component and only the markup in the template.hbs will be rendered for that component.

Credits & Links

Thanks Robbie – https://twitter.com/shipshapecode

My Latest Side Project

Hire JS - Top Javascript Developers

Hire JS – Top Javascript Developers
Hire JS is a community of top Javascript developers and top javascript jobs. We have top quality javascript, web, mobile, angular, react, ember and node developers. We have remote jobs, full and part time jobs, contracts. Save yourself time, effort and money and find the perfect developer and project.

Share A Tip

Email me at emad@emberdaily.tips if you have a good ember tip.
If you are enjoying my daily tips please spread the word with this one-click tweet.
If you do NOT like the tips then please reply to this email and let me know how I can improve them.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu