@royonk85 See this answer:
I know you’re using angular and not react, but the type of error and the solution is the same.