title: Angular router error - Invalid configuration of route
body: <p>Using angular 4, I am redirecting the route with an empty path to <em>navbar</em> component. So I have added <code>pathMatch: full</code> and I placed this entry at the top in routes array.</p>
  
  <p>But I still get the following error:</p>
  
  <blockquote>
    <p>zone.js:522 Unhandled Promise rejection:<br>
      <strong>Invalid configuration of route ''</strong>: Array cannot be specified ;<br>
      Zone: root ;<br>
      Task: Promise.then ;<br>
      Value: ZoneAwareError {<br>
      __zone_symbol__error: Error: Invalid configuration of route '': Array
      cannot be specified<br>
      at Zone.run (<a href="http://localhost:4200/polyfills.bundle.js:6405:43" rel="noreferrer">http://localhost:4200/polyfills.bundle.js:6405:43</a>) [ => angular]</p>
  </blockquote>
  
  <p><strong>route.component.ts</strong></p>
  
  <pre><code>import {Route} from '@angular/router';
  import { AppComponent } from './app.component';
  import {NavbarComponent} from './navbar/navbar.component';
  import {RegistrationComponent} from './registration/registration.component';
  
  export const appRoutes:Route =[
    {
     path: '',
     redirectTo: 'navbar',
     pathMatch: 'full'
    }, {
     path: 'home',
     component: NavbarComponent
    }, {
     path: 'navbar',
     component: NavbarComponent
    }, {
     path: 'registration',
     component: RegistrationComponent
    }
  ];
  </code></pre>
  
  <p><strong>app.module.ts</strong></p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  import { FormsModule } from '@angular/forms';
  import { HttpModule } from '@angular/http';
  import { RouterModule } from '@angular/router';
  
  import { AppComponent } from './app.component';
  import {NavbarComponent} from './navbar/navbar.component';
  import {RegistrationComponent} from './registration/registration.component';
  
  import { appRoutes } from './app.route';
  
  @NgModule({
    declarations: [
      AppComponent,
      NavbarComponent,
      RegistrationComponent
  
    ],
    imports: [
      BrowserModule,
      FormsModule,
      HttpModule,
      RouterModule.forRoot([appRoutes])
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>