I think that was done wrong from my side.
After integrating "angular-plotly.js" the ivy compiler will compile only the chjanges. That was causing the issue.
I had to stop the ng serve (Using Ctrl + C). And then rerun the command (ng serve).
And it worked like charm.