Question: I am on the process of building a chat application with nodejs, reactjs mongo and socket.io.My chat app consists of both one to one and group chats.I have built a schema for group chat and i am inserting group names along with its members and their chats in the table.Since im a beginner towards socket.io, I dont know where to put the socket logic that needs to be fired after the db post operation.Can some one suggest any examples for me?

Answer: 
It should be `this.router.navigate(['/dashboard'])`.

Or you can use `this.router.navigateByUrl('/dashboard')`
```
import { Router } from '@angular/router';
constructor(private router: Router){}

onSubmit() { 
            console.log(`username: ${this.username} password: 
            ${this.password}`)

           if(this.username == 'admin' && this.password == 'admin'){

             this.router.navigate(['/dashboard'])

          }

```