title: Is it possible to map multiple query string parameters to a property of an Angular service component?
body: <p>Question: Is it possible to retrieve a collection of query string values and assign them to a property of type <code>Filter</code> in a service component class?</p>
  <pre class="lang-js prettyprint-override"><code>interface Filter{
      title?: string;
      genreId?: number;
      inCinemas?: boolean;
      upcomingReleases?: boolean;
  }
  </code></pre>
  <p>rather than doing the following tedious, error prone of retrieval and assignment?</p>
  <pre class="lang-js prettyprint-override"><code>constructor(private route: ActivatedRoute) { }
  ngOnInit(): void {
    this.route.paramMap.subscribe({
      next: params =&gt; this.title = params.get('title'),
      error: e =&gt; console.log(e)
    });
    this.route.paramMap.subscribe({
      next: params =&gt; this.genreId = params.get('genreId'),
      error: e =&gt; console.log(e)
    });
    this.route.paramMap.subscribe({
      next: params =&gt; this.inCinemas = params.get('inCinemas'),
      error: e =&gt; console.log(e)
    });
    this.route.paramMap.subscribe({
      next: params =&gt; this.UpcomingReleases = params.get('upcomingReleases'),
      error: e =&gt; console.log(e)
    });
  }
  </code></pre>