0

ERROR TypeError: Cannot read property 'focus' of undefined

core.js:4197 ERROR Error: The pipe 'translate' could not be found!

these two errors pop out in the console whenever I change my code inside the mat-dialog box and compile my code and after that my dialog also does not open

But If I stop my Angular server and rerun it.., the changes are working fine

Any solutions or if anybody has faced a scenario like this?

  • Are you using JIT? I have same kind of problems sometimes with mat dialog when I use JIT mode. So are you running aot=false? – Janne Harju Apr 01 '21 at 13:15

1 Answers1

0

Maybe change Detection is not working properly. Please try using ChangDetectionRef.

Ex: https://angular.io/api/core/ChangeDetectorRef#detectchanges

Srikar Phani Kumar M
  • 1,069
  • 1
  • 3
  • 8