creativetimofficial / ct-material-dashboard-pro-angular

68 stars 35 forks source link

Login & Lock Page Not Display #353

Open abdulhoni opened 4 years ago

abdulhoni commented 4 years ago

https://ibb.co/k4L2kbw

prithesh990 commented 4 years ago

ya i got the same problem login page is not loading after we visit few links

prithesh990 commented 4 years ago

For quick fix fix

Find this line in your login.html

maroy1986 commented 4 years ago

I just ran into that issue as well.

This issue can be easily fixed by changing 2 lines, one in login.component.ts and another one in lock.component.ts to the following :

In login.component.ts change line 27 from : var card = document.getElementsByClassName('card')[0]; To const card = document.getElementsByClassName('card-login')[0];

In lock.component.ts, change line 14 from : const card = document.getElementsByClassName('card')[0]; To const card = document.getElementsByClassName('card-profile')[0];

This fix the issue while keeping the animations. That being said, using getElementsByClassName with index 0 is kind of a bad practice that could lead to that kind of issue overtime... So I would advise the CreativeTim team to review how they use this.