I found out that applying a ::ng-deep to a component element through related css-file can cause a changing around all components inside app. So I wrapped current component in a single css class, and modified related css correspondingly.
.my-component ::ng-deep .mat-form-field-underline { display: none; }
<div class="my-component"> .. </div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.