Created
October 18, 2019 20:08
-
-
Save mrshawnspencer/2d229916348be431d5ef2207db9dcf3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Angular/HTML/CSS | |
Sometimes, when you work with a corporate CMS,you cannot predict what people do. | |
I encountered sections on a corporate website with lots of empty DIVs. That | |
created lots of white space and negatively affected the layout. | |
You can hide empty DIVs with (S)CSS: div:empty { display: none !important; } | |
Or you can add an ng-container with *ngIf, shown below. | |
--> | |
<ng-container *ngIf="text"> | |
<div id="card-text" class="card-text" *scRichText="text"></div> | |
</ng-container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment