title: How to assign a random color in an array?
body: <p>Hey I have an array with different colors and I want that every chip that is created has a random color of this array. I tried to put all color strings in the array and look if the chips are created with the colors of the array after another. But that didnt worked.
  How can I do that?</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;ion-chip [color]="color" class="chip" #chip *ngFor="let tag of tagName"&gt;
  </code></pre>
  
  <p>TS</p>
  
  <pre><code> public color: string [] = ["ok", "nice","awesome","danger","white"]
  </code></pre>
  
  <p>tagName</p>
  
  <pre><code>export class Tag {
    tag: string;
    constructor(values: Object = {}) {
      Object.assign(this, values);
    }
  </code></pre>
  
  <p>...</p>
  
  <pre><code>  tagName: Tag[] = [];
  </code></pre>
  
  <p>...</p>
  
  <pre><code>  add(): void {
        let id = this.tagName.length + 1;
        this.tagName.push(new Tag({ tag: "tag" + id }, ));
      }
  
      remove(tag: Tag) {
        let id = this.tagName.indexOf(tag);
        this.tagName.splice(id, 1);
      }
  </code></pre>