title: How to use primeng autocomplete in angular formly(How to use completeMethod event in formly JSON)
body: <p>//I am using primeng lib in my lib. As I am implementing autocomplete functionality in formly so created autocomplete type with the help of"<a href="https://stackblitz.com/edit/ngx-formly-custom-template-3yvkcd" rel="nofollow noreferrer">https://stackblitz.com/edit/ngx-formly-custom-template-3yvkcd</a>" link. </p>
  
  <p><strong>AutoCompletecComponent</strong>  </p>
  
  <pre><code>    import { Component} from '@angular/core';  
      import { FieldType } from '@ngx-formly/core';     
      @Component({
        selector: 'formly-autocomplete',
        template: `&lt;p-autoComplete [suggestions]="results" 
        (completeMethod)="searchCity($event)"&gt;&lt;/p-autoComplete&gt;`,
      })
      export class FormlyAutoCompleteComponent extends FieldType {       
      }
  </code></pre>
  
  <p><strong>ParentComponent - trying to us searchCity function here</strong>  </p>
  
  <pre><code>@Component({
    selector: 'parent-component',
    template: `&lt;form [formGroup]="form"&gt;
      &lt;formly-form [form]="form" [fields]="fields" [model]="testModal" [options]="options"&gt; 
     &lt;/formly-form&gt;&lt;/form&gt;`
  export class ParentComponent{
  constructor(){}
  fields: FormlyFieldConfig[] = [
    "fieldGroup": [
      {
        "key": 'city',
        "type": 'autocomplete',
        "templateOptions": {
          "label": "City name",
          "placeholder": "Enter city"
        }
      },
      {
        "key": 'country',
        "type": 'select',
        "templateOptions": {
          "label": "country name",
          "placeholder": "select country"
        }
      }
    ]
  ] 
  /*How to use it here, where this function triggers on completeMethod event from autoCompleteComponent?*/
  
  searchCity(event){
  //do something
  }
  }
  </code></pre>