I am facing an issue while including my child component in my parent component in Angular 8. My child component contains only a dropdown. Now when I am including the same in the parent component and the CSS used in the div of parent component then the display output is coming as expected.
Parent Component:
<div class="col-lg-12">
<div class="form-group row">
<label class="col-sm-1 col-form-label-lg font-weight-bold">Country</label>
<div class="col-sm-5">
<app-country >
</app-country>
</div>
</div>
</div>
Child Component
<select [(ngModel)]='countryDetails.default' class="form-control form-control-lg">
<option *ngFor="let province of countryDetails.details" value={{country.id}}>
{{country.value}}
</option>
</select>
But now to reduce the coding planned to move the div class="col-sm-5" in the child component.
New Coding which is not working:
Parent Component:
<div class="col-lg-12">
<div class="form-group row">
<label class="col-sm-1 col-form-label-lg font-weight-bold">Country</label>
<app-country></app-country>
</div>
</div>
Child Component:
<div class="col-sm-5">
<select [(ngModel)]='countryDetails.default' class="form-control form-control-lg">
<option *ngFor="let province of countryDetails.details" value={{country.id}}>
{{country.value}}
</option>
</select>
</div>
In the second part if I extend the output HTML though the Web Console then found that the CSS is included in the code but then the behavior is different.
Also, note that I am using bootstrap CSS.
Any help would be appreciable.