DEV Community

Ashok Kumar
Ashok Kumar

Posted on

How to hide controls based on login status

Below is the GitHub repository for my code.
https://github.com/ashok-login/DatingAppForAngularDiscussion.git

I am learning Angular by following one Udemy course. But, I am stuck with one simple issue like below. Can someone help me to resolve the issue.

Below is the requirement.

Once after the user is logged in successfully, all the navigation links are working as expected except the Home-page link.

If the user is logged in, login controls should be removed from the DOM, and navigation links should be shown as shown in the below screenshot.

Image description

But, once after the successful login, if user clicks on Dating App (Home-page logo) as marked with 1, all the navigation controls are hiding, and login controls are showing as shown in the below screenshot.

Image description

Can someone help me to resolve this issue!

Regards,
Ashok Kumar K.

Top comments (0)