I have the following sudo html
<foo>
<span>Bar</span>
</foo>
and directive:
myapp.directive('foo', function () {
return {
restrict: 'E',
replace: true,
transclude: true,
template: '<div><p>{{usedToBeInSpan}}</p></div>'
}
});
How can I extract the contents of the nested span node and set its contents in the directives scope to usedToBeInSpan?
Note that I am not actually using this to replace a nested tag, it's just a simplified example
linkfunction and extract all html content fromspanusing.html()and add in your template.html()function on?