Skip to content

Instantly share code, notes, and snippets.

@rtablada
Last active March 7, 2019 15:04
Show Gist options
  • Save rtablada/e0414a1fcd32b5d8666659de706a29d7 to your computer and use it in GitHub Desktop.
Save rtablada/e0414a1fcd32b5d8666659de706a29d7 to your computer and use it in GitHub Desktop.
{{lookup-component Foo in "foo"}}
{{lookup-component Bar in "baz"}}
{{lookup-component Unused in "tomster"}}
{{lookup-component NavBar in "ui/nav-bar"}}
<Foo />
<Bar />
<NavBar />
{{#let (hash NavBar=(component "ui/nav-bar")) as |Lookups|}}
{{!-- No need for Lookups.Foo here since regular resolver will find Foo --}}
<Foo />
{{!-- For simple unnested aliases we can transform to the original name --}}
<Baz />
<Lookups.NavBar />
{{/let}}
{{!-- The Unused lookup is a noop because it is unused in the actual template --}}
@NullVoxPopuli
Copy link

how would I lookup a component from: src/ui/routes/application/-components/sidebar/*{hbs,ts} ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment