Is it possible to set a string-variable as the content of a template? I'd like to select two different templates depending on the scope. Something like this:
define(['app'], function(app){
app.directive('logstorelist', function(){
var temp="";
return{
scope: true,
restrict: 'A',
link: function(s, e, a){
if(a=="a")
temp = "<a>tempA</a>";
else
temp = "<div>temp</div>";
},
replace: true,
template: temp
}
})
});
Is anything like this possible?