title: Angular-Formly: Hide/Disable Fields from Service
body: <p>I have a service in which i try to disable an angular-formly field:</p>
  
  <pre><code>formField.templateOptions.disabled = true;
  </code></pre>
  
  <p>Even though the templateOption object is correct, the field is not disabled:</p>
  
  <pre><code>"templateOptions": {
      "type": "text",
      "placeholder": "",
      "label": "Single Line Test",
      "disabled": true
    },
  </code></pre>
  
  <p>Is this not possible?</p>
  
  <p>Thanks.</p>
  
  <p>Edit: Form Code before disabling in service</p>
  
  <pre><code>{
    "type": "input",
    "key": "single_line_test",
    "templateOptions": {
      "type": "text",
      "placeholder": "",
      "label": "Single Line Test"
    },
    "data": {},
    "validation": {
      "messages": {},
      "errorExistsAndShouldBeVisible": false
    },
    "id": "formly_2_input_single_line_test_3",
    "name": "formly_2_input_single_line_test_3",
    "formControl": {
      "$validators": {},
      "$asyncValidators": {},
      "$parsers": [],
      "$formatters": [
        null
      ],
      "$viewChangeListeners": [],
      "$untouched": true,
      "$touched": false,
      "$pristine": true,
      "$dirty": false,
      "$valid": true,
      "$invalid": false,
      "$error": {},
      "$name": "formly_2_input_single_line_test_3",
      "$options": null
    }
  },
  </code></pre>