title: Configure url path in angular 4
body: <p>Hello and thank you for taking the time to read this. I am trying to configure the url for the base application, and I just cannot figure out where this is done at. </p>
  
  <p>I want to call it Routing, but I know that this isn't the correct words, so let me do a bit of explanation on what I'm trying to do. We got a template for an MVC application that allowed us to add angular 2 into the app, works great from Visual Studio, we deploy in IIS  into its own web site it works. We move it to the default website it no longer works.</p>
  
  <p>With all of that said now I can explain what the issue is,
  the browser is getting to the application at <code>localhost/Test/</code> but when it is trying to download the <code>app.component.ts</code> all of the others, it then is trying to goto <code>localhost/app/app.component.js</code> not <code>localhost/Test/app/app.component</code>. Now my questions: where do i configure the url to go to localhost.<strong>Test</strong>/app...?</p>
  
  <pre><code>import { ModuleWithProviders } from '@angular/core';
  import { Routes, RouterModule } from '@angular/router';
  
  import { LoginComponent } from './components/login/login.component';
  import { GenerateComponent } from './components/generate/generate.component';
  import { NewuserComponent } from './components/newuser/newuser.component';
  import { NewlocationComponent } from './components/newlocation/newlocation.component';
  
  const appRoutes: Routes = [
      { path: '', redirectTo: 'login', pathMatch: 'full' },
      { path: 'login', component: LoginComponent },
      { path: 'generate', component: GenerateComponent },
      { path: 'newuser', component: NewuserComponent },
      { path: 'newlocation', component: NewlocationComponent }
  ];
  
  export const routing: ModuleWithProviders =
      RouterModule.forRoot(appRoutes);
  </code></pre>