I have some templates for format text, frecuencia-dia.html or frecuencia-mes.html for example.
I want call a dinamic template using the attributes tipo (text plain) and clave (variable scope).
<ng-formato-texto tipo="frecuencia" clave="{{prod.claveFrecuencia}}" />
app.directive('ngFormatoTexto', function() {
return {
templateUrl: function(elem, attr){
return '/formats/'+attr.tipo+'-'+attr.clave+'.html';
}
};
});
But don't work, this try load frecuencia-%7B%7Bprod.clavePrueba%7D%7D.html