my.component.html:角度隠し要素が点滅簡単にページが表示されたら
<div [hidden]=shouldHideErrorMessage()>Error!</div>
my.component.ts:
public shouldHideErrorMessage(): boolean {
return this.Property == null || this.Property.IsGood
}
プロパティは、そうshouldHideErrorMessage()
trueを返し、最初はnullです。しかし、ロード時にエラーメッセージが画面上で点滅します。どうすればそれを防ぐことができますか?
'* ngIf'の使用は選択肢ではありませんか? – Faisal
私はあなたの条件がnullをチェックすると、なぜthis.Property.IsGood –