title: how to create dynamic dropdown list in angularjs
body: <p>I have a problem in creating a dynamic dropdown list. I have this select options.</p>
  
  <p><strong>UPDATED</strong></p>
  
  <pre><code> &lt;div class="form-group has-feedback"&gt;
     &lt;label class="control-label"&gt;Type&lt;/label&gt;&lt;br/&gt;
     &lt;select class="form-control" ng-model="selectedItem" ng-options="item as item.name for item in items"&gt;
      &lt;option value=""&gt; Select Type&lt;/option&gt;
     &lt;/select&gt;
   &lt;/div&gt;
  
   &lt;div class="form-group has-feedback" ng-class="addstep.stepA.$valid ? 'has-success' : 'has-error';"
               ng-if="item.type==0||item.type==4||item.type==7||item.type==9"&gt;
    &lt;label class="control-label"&gt;{{labelA}}&lt;/label&gt;
     &lt;input type="url" class="form-control" ng-model="stepA" name="stepA" required&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Condition 1: let say if user select chicken, a <strong>new</strong> dropdown list will appear consist of </p>
  
  <pre><code>   &lt;option value="0"&gt;Drumstick&lt;/option&gt;
     &lt;option value="1"&gt;Thigh&lt;/option&gt;
     &lt;option value="2"&gt;Wing&lt;/option&gt;
  </code></pre>
  
  <p>Condition 2: let say user select fish, no options will appear. and user just need to click submit button</p>
  
  <pre><code>&lt;button type="button" class="btn btn-primary" ng-click="add();"
              ng-class="isLoading ? 'disabled' : '';"&gt;Add
  &lt;/button&gt;
  </code></pre>
  
  <p><strong>UPDATED</strong></p>
  
  <pre><code>$dialogScope.items = [{
                  name:"Download APK",
                  type: "0",
              },{
                  name:"Backup",
                  type:"1"
              },{
                  name:"Restore",
                  type:"2",
              },{
                  name:"Download OBB",
                  type:"4",
              },{
                  name: "Download OBB By GPU",
                  options : ["Adreno","Mali","Tegra","PowerVR","Other"]
              },{
                  name: "Download APK By GPU",
                  options : ["Adreno","Mali","Tegra","PowerVR","Other"]
              },{
                  name: "Download CACHE",
                  type:"7",
              },{
                  name: "Download CACHE By GPU",
                  type:"8",
              },{
                  name: "Download CACHE &amp; Unzip After Install",
                  type:"9",
              },{
                  name: "Download CACHE By GPU &amp; Unzip After Install",
                  type:"10",
              },
  
              ];
  </code></pre>