0

I have a toggle option in my page like this:

<div class="jumbotron">
  <div class="btn-group">
    <label class="btn btn-primary" id="singleChoose" ng-model="radioModel" ng-change="toggleMode()" btn-radio="'Single'">Single</label>
    <label class="btn btn-primary" id="bulkChoose" ng-model="radioModel" ng-change="toggleMode()" btn-radio="'Bulk'">Bulk</label>
  </div>
  <form id="singleContentForm" name="singleContentForm">
    <div id="singleContent" class="vertical">
      <div id="republish_alert_success" role="alert">
        <img src="images/DataServicesAdminAppSuccess.png" width="40" height="40" alt="" />
        <strong>Success!</strong> Policy republished.
      </div>
    </div>
  </form>
  <form id="bulkContentForm" name="bulkContentForm">
    <div id="bulkContent" class="horizontal">
      <select class="custom-select" ng-model="republishSource" ng-options="choice.name for choice in republishSources"></select>
      <div class="col-md-6">
        <input id="republishUpload" required="true" type="file" class="form-control" placeholder="Upload republish file" file-model="uploadedRepublishFile" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
        />
      </div>
      <div aria-label="file upload">
        <input id="republish" type="submit" class="btn btn-success" ng-click="doRepublishFile()" value="Republish" />
      </div>
    </div>
  </form>
</div>

I wish to reload the div whenever I'm choosing the toggle of that specified div.

i.e., When I choose Single, the Single should be reloaded before rendering.

Can someone help me with this?

Fabian N.
  • 3,807
  • 2
  • 23
  • 46
Mike
  • 721
  • 1
  • 17
  • 44
  • Reloading means what? On toggle, you want to fetch data again from the API or what? – Yashwardhan Pauranik Aug 07 '18 at 16:31
  • Consider the Bulk type. On toggling, I choose a value from select, and choose a CSV too for file upload. Now when I toggle to Single and back to Bulk again, the earlier chosen values in Bulk remains the same. I do not want that. I need the data to be cleaned and refreshed as default. – Mike Aug 08 '18 at 08:58

0 Answers0