title: Cannot delete property '1' of [object Array]
body: <p>get list with <code>Input</code> in my components :</p>
  
  <p><code>@Input() usersInput: Section[];</code></p>
  
  <pre><code>export interface Section {
      displayName: string;
      userId: number;
      title: number;
  }
  </code></pre>
  
  <p><strong>and this is the value list :</strong></p>
  
  <pre><code>    0:
       displayName: "بدون نام"
       firstName: null
       lastName: null
       title: 0
       userId: 1
     1:
       displayName: "محمدامین چهاردولی"
       firstName: "محمدامین"
       lastName: "چهاردولی"
       title: 0
       userId: 2
  </code></pre>
  
  <p>in <code>ngAfterViewInit</code> i set the input Value to users List :</p>
  
  <pre><code>ngAfterViewInit(): void {
      this.users = this.usersInput;
      if (this.users.length === 0) {
          this.show = false;
      } else {
          this.show = true;
      }
  }
  </code></pre>
  
  <p>this is Users :</p>
  
  <p><code>users: Section[] = [];</code>
  and i use it in html List :</p>
  
  <pre><code>&lt;div *ngFor="let item of users" class="d-flex selected-list-items mt-3"&gt;
      &lt;div class="col-md-5 col-lg-5 col-xs-5 col-sm-5 col-xl-5"&gt;
          &lt;label&gt;{{item.displayName}}&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="col-md-5 col-lg-5 col-xs-5 col-sm-5 col-xl-5"&gt;
          &lt;label&gt; {{ getEnumTranslate(item.title)}}&lt;/label&gt;
      &lt;/div&gt;
      &lt;div class="justify-content-center col-md-2 col-lg-2 col-xs-2 col-sm-2 col-xl-2"&gt;
          &lt;button (click)="deleteUser(item.userId)" mat-button&gt;
              &lt;mat-icon aria-label="Delete" color="accent"&gt;delete&lt;/mat-icon&gt;
          &lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>now when i need to use delete button :</p>
  
  <pre><code>  &lt;button (click)="deleteUser(item.userId)" mat-button&gt;
         &lt;mat-icon aria-label="Delete" color="accent"&gt;delete&lt;/mat-icon&gt;
    &lt;/button&gt;
  </code></pre>
  
  <p>ts :</p>
  
  <pre><code>    deleteUser(id: number): void {
      let userModel = {} as Section;
      userModel = this.users.find(x =&gt; x.userId === id);
      const index = this.users.indexOf(userModel);
      this.users.splice(index, 1);
      this.emitValueModel.push(
          {
              title: this.user.title,
              userId: this.user.userId
          }
      );
      this.selectedUserId.emit(this.emitValueModel);
      if (this.users.length === 0) {
          this.show = false;
      }
      this.cdref.detectChanges();
  }
  </code></pre>
  
  <p>it show me this error :</p>
  
  <blockquote>
    <p>ERROR TypeError: Cannot delete property '1' of [object Array]</p>
  </blockquote>
  
  <p><strong>whats the problem??? how can i solve that ?</strong></p>