title: pass URL in an URL as parameter in angular
body: <p>I am building a 404 page, and I would like to be redirected to different location depending on where the user was.</p>
  <p>I made a route in my router that looks like this :</p>
  <pre><code>      {
          path: 'not-found/:backTo,
          component: NotFoundComponent,
        },
  </code></pre>
  <p>in my code I do</p>
  <pre><code>      this.router.navigate(
          [
            'not-found',
            this.router.serializeUrl(
              this.router.createUrlTree(
                ['new', 'url', 'for', 'redirect']
              )
            ),
          ],
          { skipLocationChange: true }
        )
  </code></pre>
  <p>so it looks like navigate to <code>this.router.navigate([&quot;not-found&quot;, &quot;/new/url/for/redirect&quot;])</code></p>
  <p>problem is, I never arrive to my 404 page, which was working before I tried this.</p>
  <p>I guess I am doing wrong, cause the url is wierd, and it should be like</p>
  <p><code>not-found?backTo='new/url/for/redirect'</code></p>
  <p>but I can't manage to make it, and work with angular routing.</p>