ember.js - How to call components inside a components with pods structure in ember cli -
i have 2 components x-foo , y-foo in pods structure.
app/pods/components/x-foo/template.hbs app/pods/components/y-foo/template.hbs
i want call y-foo component inside x-foo component's template.hbs this:
<section> {{y-foo}} </section>
but errors out saying y-foo helper doesn't exist. can show me right way in pods structure?
i've managed fix creating parent component path , calling child component via {{component y-foo}}.
ember generate component x-foo --pod --path x
will generate x-foo component in
app/pods/x/x-foo/component.js
app/pods/x/x-foo/template.hbs
in x-foo component template, call y-foo component this:
<section> {{component y-foo}} </section>
the reason question because i'm trying future-proof ember 1.x ember 2.0. i'm not sure though if i'm doing right thing, looks okay in opinion.
Comments
Post a Comment