mardi 4 mars 2014

AngularJS - $xhr.cache vs $templateCache for template


Vote count:

0




I'm looking at this example. The directive itself is not particularly relevant but I noticed the template is stuffed into $xhr.cache instead of $templateCache. I'm wondering if there is any difference between the two and whether it would change anything if I used $templateCache instead. What could $xhrCache be used for in other situations?



$xhrCache.data['node.html'] = {
value:
'<ul>' +
'<li ng:repeat="node in node.children">' +
'{{node.name}}' +
'<ng:include src="\'node.html\'"></ng:include>' +
'</li>' +
'<ul>'
};


asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire