I am developing in angular js. Previously, i use ng-include with url. But how could i point the url to templatecache?
<ng-include
src="string"
[onload="string"]
[autoscroll="string"]>
...
</ng-include>
Template cache uses a key for identifying the cached elements, so you can use the key for that.
$templateCache.put('MY KEY', 'Cached content');
And in the html:
<ng-include src="'MY KEY'"></ng-include>
See it on AngularJS docs for $templateCache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With