title: How to redirect to a component if user accessing a protected route, directly through browser url?
body: <p>I have successfully made a login page in angular 7 using protected routes and now if the user tries login with correct credentials it will redirect to a Dashboard component and if credentials are false it will just display a message "Invalid login" in login component itself.</p>
  
  <p>Now how can I configure if the user is directly browsing to the protected component through browser URL? 
  currently, it's displaying just blank page and not getting accesses to the protected route.</p>