title: How to pass the data as params in the route using window.open in angular8
body: <p>i have listing page in which based on click of edit or view, it should open in the new tab the profile page. So i have used <code>window.open('/profile'+'/' + data.group + '/' + data.profile + '/' + mode,'_blank')</code> in the listing page on click of edit or view button. so here i had also given which mode i had clicked, whether it is `edit or view. So as on click of multiple users multiple tab must be opened along with the data and mode, i had thought of approaching a method where in i can pass the data and mode as params in the url.
  But after this i am struck, not getting how to go forward.
  here from the url params how can i fetch the id's and mode.</p>
  
  <pre><code>http://localhost:4200/profile/101/101/ro
  </code></pre>
  
  <p>here </p>
  
  <p>Ts:</p>
  
  <pre><code>public editAgent(data, mode) {
      this.selected = { data, mode };
      window.open('/profile'+'/' + data.group + '/' + data.profile + '/' + mode,'_blank')
    }
  </code></pre>
  
  <p>Routing of profile page:</p>
  
  <pre><code>{
          path: '', component:ProfileComponent
      }
  </code></pre>
  
  <p>In home page i had given profile page routing like this:</p>
  
  <pre><code>const homeRoutes: Routes = [
    { path: "", component: HomeComponent ,
     children: [
      { path: 'profile/:id/:id/:mode', loadChildren: () =&gt; import('../profile/profile.module').then(m =&gt; m.ProfileModule) }
    ] }
  ];
  </code></pre>