« All deprecation guides
Deprecation Guide for
Deprecation Guide for
{{partial}}
until: 4.0.0
id: ember.partial
We are deprecating usage of {{partial}}
in accordance with RFC #449.
Partials should be migrated to components. For example, consider the following quick-tip
partial:
{{#let (hash title="Don't use partials" body="Components are always better") as |tip|}}
{{partial "partials/quick-tip"}}
{{/let}}
<h1>Tip: {{tip.title}}</h1>
<p>{{tip.body}}</p>
<button {{on "click" this.dismissTip}}>OK</button>
It can be converted to a component as follows:
{{#let (hash title="Don't use partials" body="Components are always better") as |tip|}}
<QuickTip @tip={{tip}} @onDismiss={{this.dismissTip}} />
{{/let}}
<h1>Tip: {{@tip.title}}</h1>
<p>{{@tip.body}}</p>
<button {{action @onDismiss}}>OK</button>