問題タブ [angular-changedetection]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
angular - ngOnChanges スローエラー「ExpressionChangedAfterItHasBeenCheckedError」を使用した Angular Material Change Detection
コンポーネントの入力プロパティがあり、現在のデータが未定義でない場合にのみ表示する必要があります。
変更を検出するために ngOnChanges を使用していますが、「ExpressionChangedAfterItHasBeenCheckedError」エラーがスローされます。
これがコードです。
Stackblitz リンク: https://stackblitz.com/edit/angular-snackbar-top-bdmsmz
エラーを解決する方法はありますか。