I have read the documentation for $templateCache but I'm still struggling to understand how to load remote templates into the cache using the put function.
Below is an example:
onBoardingApp.run(function ($templateCache, $http) {
$templateCache.put('tpl1.html', '<p>Hello World</p>');
$templateCache.put('tpl2.html', '~/Templates/Pi/pi-1.html');
alert($templateCache.get('tpl1.html'));
alert($templateCache.get('tpl2.html'));
});
While my code returns the HTML code for tpl1, the path is being returned for tpl2. My question is: How to load a remote template using $templatecache.put().
Thanks for the help.