There used to be a replace-property for directives in Angular, which is now deprecated.
angular.module('myModule')
.directive('myDirective', myDirectiveCtrl);
function myDirectiveCtrl() {
return {
'restrict': 'A',
'scope': false,
'replace': true,
'template': '<span>content</span>',
'link': function () {}
};
}
In the template I could use something like this:
<div my-directive></div>
and it would be replaced with this
<span>content</span>
The example might not be the most useful, but I would like to point out the concept.
I already searched on Stackoverflow and Google, but couldn't find an answer. Also, I could not come up with a working solution, therefore I cannot provide solution code.
Question: How to I substitute the replace-property in newer Angular versions?