angular-tooltips
angular-tooltips copied to clipboard
Angular Template cache is now supported
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.
It fixes #151.
Hi @slavafomin thanks for your time, as described in https://github.com/720kb/angular-tooltips/pull/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 👍
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.
@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.
Then be sure to look, there is a tooltipConfProvider somewhere which must be updated the same ;)
https://github.com/720kb/angular-tooltips#globals