I have the code:
htmlObject = '<div status-box></div>';
template = $compile(htmlObject)($scope);
$scope.$digest();
console.log(template);
var templateAsHtml = template.html();
console.log(templateAsHtml);
and the output: from the first console.log:
{0: <div status-box="" class="ng-scope"></div>, length: 1}
and from the second:
''
It seems like the moment I call .html it just not converting it and it is empty.
var templateAsHtml = template[0].outerHTML;, why?