-4

자료 2 웹 사이트에 설명 된대로 양식 및 입력을 추가하려고합니다. 양식이 표시되지 않지만 양식 입력을 클릭하면 표시됩니다.각형 2 양식이 표시되지 않습니다.

추가 정보 (업데이트) : 나는 사용자 지정 테마를 사용하고

.

$customTheme: mat-dark-theme($primary, $accent, $warn); 

하지만 좀 더 가벼운 테마로 변경하면 양식 요소가 나타납니다.

$customTheme: mat-light-theme($primary, $accent, $warn); 

나는 background와 currentColor와 관련이 있다고 생각한다.

+1

누군가가 당신을 도울 수 있도록 더 많은 정보를 추가해야합니다. – itdoesntwork

답변

0

알아낼 수 있습니다.

어두운 테마를 사용하는 경우 양식의 배경색은 어두운 색이며 흰색이 아닙니다.

밝은 배경 테마로 secondaryTheme을 추가하고이를 양식에 사용하면 문제가 해결되었습니다.

$mainTheme: mat-dark-theme($primary, $accent, $warn); 

$secondaryTheme : mat-light-theme($primary, $accent, $warn); 

@include angular-material-theme($mainTheme); 

.secondaryTheme { 
    @include angular-material-theme($secondaryTheme); 
} 

<div class="secondaryTheme"> 

    <mat-form-field> 
    <input matInput placeholder="Input"> 
    </mat-form-field> 

    <mat-form-field> 
    <textarea matInput placeholder="Textarea"></textarea> 
    </mat-form-field> 
</div>