我有两个DOM,如图所示。问题是带圆圈的< div class = panel-heading largeText">在第一个模板中获得[_ngcontent-c1]的样式,而相同的< div>获得panel-primary>的样式.panel航向。模板如图3和图4所示。有谁知道问题是什么?我在哪里可以找到[class.active]属性的文档?感谢。
图3:
<div *ngIf="show">
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading largeText">
Hep C Note
</div>
<div class="panel-body">
<div class="row">
<div class="col col-md 12">
<!--<form #hepcFormVar="ngForm" (ngSubmit)="save(hepcFormVar)" novalidate>-->
<form #hepcFormVar="ngForm" novalidate>
<div class="form-group">
<label class="control-label">Patient:</label>
<span name="patientName" class="largeText">{{patientName}}</span>
</div>
&#13;
图4:
<div *ngIf="show">
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading largeText">
Vista Note
</div>
<div class="panel-body">
<div class="row">
<div class="col col-md 12">
<!--<form #vistaNoteFormVar="ngForm" (ngSubmit)="submit(vistaNoteFormVar)" novalidate>-->
<form #vistaNoteFormVar="ngForm" novalidate>
<div class="form-group">
<label class="control-label" for="patientName">Patient:</label>
<span name="patientName" id="patientName" class="largeText">{{patientName}}</span>
</div>
&#13;
答案 0 :(得分:0)
啊!我为每个模板使用了单独的css。我认为largeText是一个Bootstrap css类。当我在Vist-Note组件使用的CSS中添加样式时,问题得以解决。