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

Add compileStep.packageName to templateCache key #258

Closed
pward123 opened this issue Mar 24, 2015 · 5 comments
Closed

Add compileStep.packageName to templateCache key #258

pward123 opened this issue Mar 24, 2015 · 5 comments
Milestone

Comments

@pward123
Copy link

I like to organize my angular templates into meteor packages to make it easier to use tinytest, etc.

The angular-meteor plugin uses compileStep.inputPath when placing the compiled templates into $templateCache. This causes templates with the same path (relative to their package) to register with the same key in $templateCache.

Any chance of fixing this? (it would be a breaking change)

@Urigo
Copy link
Owner

Urigo commented Mar 27, 2015

@pward123 that's interesting, can you share a scenario?
also, what other suggestion to you have for the naming source? maybe we can add a package name prefix?
@netanelgilad other ideas?

@pward123
Copy link
Author

I'm new to angular, so I've been playing around with building a sample application. Here's the repo (the readme has a description of the problem):

https://github.com/pward123/angular-base

@pward123
Copy link
Author

Meteor has to deal with a similar situation when assets are placed in a package. Instead of dropping your_logo_here.png into the main application's /public tree, I'm calling api.addFiles from the ui-login/package.js file.

In order to keep packages from overwriting each other's assets, Meteor prepends the package name plus an underscore to create the path to the asset:

<img src=/packages/angular-base_ui-login/client/assets/your_logo_here.gif">

@Urigo
Copy link
Owner

Urigo commented Mar 29, 2015

@pward123 that sounds legit.
Do you want to create a pull request for that and get the credit?

@pward123
Copy link
Author

Done. PR #303

@Urigo Urigo added this to the 0.8.5 milestone Apr 19, 2015
@Urigo Urigo closed this as completed in b38286d Apr 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants