Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can.stache will import components it depends on #1387

Closed
justinbmeyer opened this issue Jan 2, 2015 · 0 comments
Closed

can.stache will import components it depends on #1387

justinbmeyer opened this issue Jan 2, 2015 · 0 comments
Milestone

Comments

@justinbmeyer
Copy link
Contributor

Related to #1386, can.stache templates should be able to import components and modules they depend on.

For example, if a stache template looks like:

<div><can-slider></can-slider></div>

It will be transpiled to import can-slider.

Also, a template might depend on helpers. These can be imported like:

<import from="my/helpers">

It's possible that a component's name doesn't match it's moduleName. We can also support the following:

<import from="components/slider" as="can-slider">
<can-slider></can-slider>

In this case can-slider will not be imported, only components/slider.

Other

  • This will only happen for templates loaded with the can/view/stache/system extension.
  • It's possible that we eventually support this happening with progressively loaded templates. However, can.view will need to support promises.
justinbmeyer added a commit that referenced this issue Jan 2, 2015
justinbmeyer added a commit that referenced this issue Jan 5, 2015
justinbmeyer added a commit that referenced this issue Jan 7, 2015
justinbmeyer added a commit that referenced this issue Jan 7, 2015
@daffl daffl added this to the 2.2.0 milestone Jan 10, 2015
@daffl daffl closed this as completed Feb 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants