title: Set default query params while routing
body: <p>I've the following route config:</p>
  
  <pre><code>const routes: Routes = [
    // another routes
    { component: UsersListComponent, path: 'users' }
  ];
  </code></pre>
  
  <p>I want to "automatically" include some default QUERY parameters when something route to this. </p>
  
  <p><strong>E.g.:</strong></p>
  
  <p>The route <code>/users</code> become <code>/users?p=1s&amp;15</code>, when it has NO query parameters.</p>
  
  <p>I just got stucked trying to do it with guards (I'm not even sure that's the best choice for do this). Below is a piece of my actual code: </p>
  
  <pre><code>canActivate(
      next: ActivatedRouteSnapshot,
      state: RouterStateSnapshot): Observable&lt;boolean&gt; | Promise&lt;boolean&gt; | boolean {
      // Just for make it clear:
  
      if (state.url === '/users') {
        this.router.navigate([], {
          queryParams: {
            p: 1,
            s: 15
          },
          relativeTo: this.activatedRoute
        });
      }
  
      return true;
    }
  }
  </code></pre>
  
  <p><a href="https://stackblitz.com/edit/angular-router-example-redirect-guard-y3cvuf" rel="nofollow noreferrer"><strong>Stacbklitz link</strong></a></p>