app
.controller("templateCtrl", function ($scope, $templateCache){
$scope.templatePath = "registration/form";
$scope.template = $templateCache.get($scope.templatePath);
})
.directive("templateview", function (){
return {
scope: {
template: "="
},
restrict: "E",
template: "{{template}}",
link: function (scope){
console.log(scope);
}
}
});
<templateview data-template="template"></templateview>