I have home component in homeModule and contactUs componenent in contactModule. 

When I click cancel in contactUs component, it should redirect us to Home.

routes

```
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {homeComponent} from './home/home.component';

const routes: Routes = [
{ path: 'home', component: homeComponent},
{ path: 'demo-ui/home', component: homeComponent},
];

@NgModule({
imports: [
RouterModule.forRoot(routes)
],
exports: [RouterModule],
declarations: []
})
export class AppHomeRoutingModule {
}

```

I tried the following code but it didnt work

```
 import { Component, OnInit } from '@angular/core';
 import { FormsModule, Validators, NgForm } from '@angular/forms';
 import { Router } from '@angular/router';

 @Component({
   //some code
 })
export class contactUsComponent implements OnInit {
constructor( private router: Router ){
}

ngOnInit() {
}

redirect(){
this.router.navigateByUrl('/home');    }

}
 //html
 <button class="btn btn-primary" type="button"  (click)="redirect()"> 
  Cancel </button>

```

Also, I tried 

```
<button class="btn btn-primary" type="button"  [routerLink]="['/home']"> Cancel </button>

```

and 

```
<button class="btn btn-primary" type="button"  routerLink="/home"> Cancel </button>

```

Error: Cannot match any routes. URL Segment './home'