Welcome Guest, Not a member yet? Register   Sign In
Retrieving a username in Angular
#1

What are the differences between components, directives, and services in Angular? Question I was asked in an angular interview and I was not able to answer it. The question is as follows:
Suppose you have a login screen and you enter a username and password to log in. Now after 5-6 pages or after n number of pages, there is a requirement that need username. How you will access the username there? My answer was I can use query param for it. Then the interviewer told it can be done by queryparams but that is not a good way to always carry a username in query params.
What is the correct answer to this? How it is done.

Thanks!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB