ember.jsember.js-2

Using component vs partial for 'site header' in ember.js


This is more of a design/best practice question, in Ember 2.x

I am building a new ember web app, and for the site's header, I created a separate component, site-header and included that in the application.hbs as follows.

application.hbs

{{site-header}}
{{outlet}}

I am trying to find out, if using a partial instead of a component might be a better choice, for the following reasons:

This component, site-header...


Solution

  • Personally I would keep it as a component since Ember is moving towards that kind of architecture.