Angular6 implements the jump to the home page in the ts file

    In
  • angular6, what do you do if you want to jump to index.html, through code in the component"s ts file?
  • Let"s also talk about the most primitive requirements:

    if you use the modal form to display the login page in the home page, after successfully logging in, the modal form is set to invisible.
    then the home page is reflected. After clicking "Log out", you need to jump back to the main page and set the modal form
    to be visible, so there is the need to jump to the home page in the ts file
    .
Dec.13,2021

just skip routing what the home page route is.


  constructor(private router:Router) {

  }

   ...

   jumpToHome():void{
            this.router.navigateByUrl('/');
   }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf4de9-30c79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf4de9-30c79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?