title: check url param from set
body: <p>I have a set of words, and I want that the component will read the value from the url (like <code> localhost:4200/classify/bbc</code> ) and if the value is in the set, the relevant radio will be selected.
  If value is not in the set a comment will appear to the user.</p>
  <p>classify.component.ts :</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { ActivatedRoute } from '@angular/router';
  
  @Component({
    selector: 'classify',
    templateUrl: './classify.component.html',
    styleUrls: ['./classify.component.css']
  })
  export class ClassifyComponent implements OnInit {
    favoriteChannel: string;
    channels: string[] = ['BBC', 'CNN', 'NBC'];
  
    constructor(private route:ActivatedRoute) { }
  
    ngOnInit(): void {
      this.favoriteChannel = this.route.snapshot.params.channels;
    }
  
  }
  </code></pre>
  <p>classify.component.html :</p>
  <pre><code>&lt;label id=&quot;example-radio-group-label&quot;&gt;Pick your favorite channel&lt;/label&gt;
  &lt;mat-radio-group
    aria-labelledby=&quot;example-radio-group-label&quot;
    class=&quot;example-radio-group&quot;
    [(ngModel)]=&quot;favoriteChannel&quot;&gt;
    &lt;mat-radio-button class=&quot;example-radio-button&quot; *ngFor=&quot;let channel of channels&quot; [value]=&quot;channel&quot;&gt;
      {{channel}}
    &lt;/mat-radio-button&gt;
  &lt;/mat-radio-group&gt;
  &lt;div&gt;Your favorite channel is: {{favoriteChannel}}&lt;/div&gt;
  </code></pre>
  <p>routing :</p>
  <pre><code>  { path: 'classify/:channels', component: ClassifyComponent },
  </code></pre>
  <p>nav.component.html :</p>
  <pre><code>      &lt;a mat-list-item [routerLink]=&quot;['/classify','bbc']&quot; routerLinkActive=&quot;active&quot;&gt;Classify&lt;/a&gt;
  </code></pre>