I'm trying to use `Router` for redirection within my Angular 5 component.

In the `app.module` I have:

```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { HttpModule } from '@angular/http'
import { Router, RouterModule } from '@angular/router';

import { AppComponent } from './app.component';
import { ProductFormComponent } from './productform/productform.component';
import { ProductComponent } from './productform/product/product.component';
import { ProductService } from './productform/shared/product.service';

@NgModule({
    declarations: [
        AppComponent,
        ProductFormComponent,
        ProductComponent
    ],
    imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        ReactiveFormsModule,
        RouterModule
    ],
    exports: [
        RouterModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

```

In the component:

```typescript
import { Injectable } from '@angular/core';
import { Component, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms'
import { Router, RouterModule } from '@angular/router'@Component({
    selector: 'app-product',
    templateUrl: 'product.component.html'
})
export class ProductComponent implements OnInit, AfterViewChecked {
    constructor(private router: Router) {
    }
}

```

Whenever I try to use `this.router` within component function I'm getting the error in the console:

```
Unhandled Promise rejection: StaticInjectorError[Router]: 
  StaticInjectorError[Router]: 
    NullInjectorError: No provider for Router! ; Zone: <root> ; Task: Promise.then ; Value: Error: "StaticInjectorError[Router]: 
  StaticInjectorError[Router]: 
    NullInjectorError: No provider for Router!"

```

I'm not sure I should add a provider and what provider?

I am new to angular, not fully understand how it works.

Thanks