简体   繁体   中英

change angular application loading url

In my angular application when I run the application it starts at localhost:4200 but my requirement is the application should load at 'localhost/test4health' . Can any one tell where I need to make this change?

You can do this with Angular routes

in your app-routing.ts file, you can replace your default route with this:

const routes: Routes = [
  {
    path: '',
    pathMatch: 'full',
    redirectTo: '/test4health'
  }
];
  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM