title: Angular 7: Display fields dynamically
body: <p>We are trying to build a search page in Angular 7 with Spring Rest API as backend. The search page has a drop down on the top. Based on the selection on the drop down, a set of search fields should be displayed. The details of the fields to be displayed are fetched from the DB using a rest service. Attached below is such a rest service response. <p>The fieldType drives the type of the field, i.e, text , drop down, calendar etc. How can we create a component in angular to display the fields based on this json response ?</p>
  
  <pre><code>{
    "docs": [
      {
        "collectionId": "letterCollection",
        "collectionName": "Letters",
        "fieldId": "LetterType",
        "fieldName": "Letter Type",
        "fieldLabel": "LetterType",
        "fieldType": "DROPDOWN",
        "placeHolder": "",
        "searchFieldSequence": "0"     
      },
      {
        "collectionId": "letterCollection",
        "collectionName": "Letters",
        "fieldId": "ProcessDate",
        "fieldName": "Process Date",
        "fieldLabel": "ProcessDate",
        "fieldType": "TEXT",
        "placeHolder": "YYYY/MM/DD",
        "searchFieldSequence": "1"     
      }
      ]
  }
  </code></pre>