Is it possible to remove or disable the HTML comments angular produces?
<ol class="items">
<!-- ngRepeat: item in list | orderBy:'time':true -->
</ol>
Its breaking CSS rules that use :empty
pseudo class.
ol:empty {
content: "No results";
}
In order for the rule to be applied, there needs to be no whitespace or comments:
<ol></ol>
I ended up adding a class .empty
with ng-class="{ empty: !list.length }"
and applying the CSS rule that way without relying on the pseudoelement :empty
.
$compileProvider.debugInfoEnabled(false);
But it can broke some plugins which have references on angular comments.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With