navigateTo(route, opt_dynamicParameters, opt_removeSearch) {
      // The ADVANCED route only serves as a parent of subpages, and should not
      // be possible to navigate to it directly.
      if (route == this.routes_.ADVANCED)
        route = /** @type {!settings.Route} */ (this.routes_.BASIC);

      const params = opt_dynamicParameters || new URLSearchParams();
      const removeSearch = !!opt_removeSearch;

      const oldSearchParam = this.getQueryParameters().get('search') || '';
      const newSearchParam = params.get('search') || '';

      if (!removeSearch && oldSearchParam && !newSearchParam)
        params.append('search', oldSearchParam);

      let url = route.path;
      const queryString = params.toString();
      if (queryString)
        url += '?' + queryString;

      // History serializes the state, so we don't push the actual route object.
      window.history.pushState(this.currentRoute.path, '', url);
      this.setCurrentRoute(route, params, false);
    }
/**
     * Navigates to a canonical route and pushes a new history entry.
     * @param {!settings.Route} route
     * @param {URLSearchParams=} opt_dynamicParameters Navigations to the same
     *     URL parameters in a different order will still push to history.
     * @param {boolean=} opt_removeSearch Whether to strip the 'search' URL
     *     parameter during navigation. Defaults to false.
     */
Navigates to a canonical route and pushes a new history entry.
@param {!settings.Route} route
@param {URLSearchParams=} opt_dynamicParameters Navigations to the same
URL parameters in a different order will still push to history.
@param {boolean=} opt_removeSearch Whether to strip the 'search' URL
parameter during navigation. Defaults to false.
Navigates to a canonical route and pushes a new history entry . @param { !settings . Route } route @param { URLSearchParams = } opt_dynamicParameters Navigations to the same URL parameters in a different order will still push to history . @param { boolean = } opt_removeSearch Whether to strip the ' search ' URL parameter during navigation . Defaults to false .
navigateTo(route, opt_dynamicParameters, opt_removeSearch) {
      if (route == this.routes_.ADVANCED)
        route =  (this.routes_.BASIC);
      const params = opt_dynamicParameters || new URLSearchParams();
      const removeSearch = !!opt_removeSearch;
      const oldSearchParam = this.getQueryParameters().get('search') || '';
      const newSearchParam = params.get('search') || '';
      if (!removeSearch && oldSearchParam && !newSearchParam)
        params.append('search', oldSearchParam);
      let url = route.path;
      const queryString = params.toString();
      if (queryString)
        url += '?' + queryString;
      window.history.pushState(this.currentRoute.path, '', url);
      this.setCurrentRoute(route, params, false);
    }
navigateTo ( route , opt_dynamicParameters , opt_removeSearch ) { if ( route == this . routes_ . ADVANCED ) route = ( this . routes_ . BASIC ) ; const params = opt_dynamicParameters || new URLSearchParams ( ) ; const removeSearch = ! ! opt_removeSearch ; const oldSearchParam = this . getQueryParameters ( ) . get ( 'search' ) || '' ; const newSearchParam = params . get ( 'search' ) || '' ; if ( ! removeSearch && oldSearchParam && ! newSearchParam ) params . append ( 'search' , oldSearchParam ) ; let url = route . path ; const queryString = params . toString ( ) ; if ( queryString ) url += '?' + queryString ; window . history . pushState ( this . currentRoute . path , '' , url ) ; this . setCurrentRoute ( route , params , false ) ; }
Navigates to a canonical route and pushes a new history entry.
Navigates to a canonical route and pushes a new history entry .
// The ADVANCED route only serves as a parent of subpages, and should not // be possible to navigate to it directly. /** @type {!settings.Route} */ // History serializes the state, so we don't push the actual route object.