Using $templateRequest , you can download the template by URL without having to embed it in your HTML page. If the template is already loaded, it will be displayed from the cache.
app.controller('testCtrl', function($scope, $templateRequest, $sce, $compile){
Remember that this is a manual way to do this, and in most cases the preferred way is to define a directive , which retrieves the template using the templateUrl property.
cdauth Apr 19 '15 at 22:47 2015-04-19 22:47
source share