These are chat archives for angular/material

10th
Aug 2017
Luke Skelhorn
@SCRATK
Aug 10 2017 10:32
Hi I'm trying to use a dialog box and I'm getting this error Component viewGuardianDeleteDialog is not part of any NgModule or the module has not been imported into your module. Has anyone had this error before

@rmj9431 This is how I've used my date picker hope this helps

<md-input-container class="form-full-width">
      <input mdInput [mdDatepicker]="startDate" placeholder="Start Date" [formControl]="newEventForm.controls['start_date']" required>
      <button mdSuffix [mdDatepickerToggle]="startDate"></button>
      <md-error *ngIf="newEventForm.controls['start_date'].hasError('required')">
        Start Date is <strong>needed</strong>
      </md-error>
    </md-input-container>

and then added this within side of the form tags

<md-datepicker #startDate></md-datepicker>
Ergun Polat
@limpep
Aug 10 2017 15:42

hi I am trying to use autocomplete on the following array which has an object and an array of values for example

[
  {
    "cat": "Accommodation and Food Service Activities",
    "value": [
      {
        "sic": "55",
        "desc": "Accommodation"
      },
      {
       "sic": "56",
        "desc": "Food and beverage service activities"
      }
    ]
  }
]

I would like to filter on thevalue.desc array using regex if possible, I have the following method

filteredIndustries(industry: string) {
    return this.industries.filter(sector => {
      return new RegExp(`^${industry}`, 'gi').test(sector);
    });
  }

but this is not right, if anyone can point me in the right direction that would be much appreciated