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

Angular Template cache is now supported #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slavafomin
Copy link

@slavafomin slavafomin commented Apr 19, 2016

I've implemented support for Angular template cache. Now, the module first tries to load specified template from cache and then falls back to $http.get. When template is actually loaded from server it is saved in the cache for further use. This is the expected behavior for any Angular module that uses templates.

@slavafomin
Copy link
Author

It fixes #151.

@45kb
Copy link
Member

45kb commented Apr 19, 2016

Hi @slavafomin thanks for your time, as described in #150 to merge a templateCache feature it has to be an option that you can toggle via attribute.

tooltip-template-cache="true" and it caches the template you pass through 👍

@slavafomin
Copy link
Author

Hey @45kb! Why do you want it to be optional? Angular itself and many other popular modules are using template cache automatically, without the any opt-ins. If user don't want to use template cache he just could skip adding anything to it. If you're concerned about $templateCache.put that I call, we could omit this line or make it optional.

@45kb
Copy link
Member

45kb commented Apr 19, 2016

@slavafomin i can agree with you but the real correct way is simple, set an attribute, if the attribute is present or true, you store and retrieve the template in and from the cache, otherwise you don't have to interact with cache.

It's not my own view or choice, it's how we should release features to make everyone happy and for any possible use case, i hope you'll understand.

@45kb
Copy link
Member

45kb commented Apr 19, 2016

Then be sure to look, there is a tooltipConfProvider somewhere which must be updated the same ;)

https://github.com/720kb/angular-tooltips#globals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants