title: How to add selected attribute to ng-repeated dropdown form?
body: <p>I have a form that builds out multiple widgets based on some JSON data. In part of that form is a select dropdown, and some items have different options selected by default.</p>
  
  <p>ie: </p>
  
  <pre><code>object 1 {
      tag: "products"
  }
  </code></pre>
  
  <p>The select dropdown in the ng-repeat widget</p>
  
  <pre><code>&lt;select class="btn-success form-control"&gt;
      &lt;option value="companies"&gt;companies&lt;/option&gt;
      &lt;option value="news"&gt;news&lt;/option&gt;
      &lt;option value="people"&gt;people&lt;/option&gt;
      &lt;option value="products"&gt;products&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>^ Here if this was <strong>object 1</strong>, I'd need the products option to gain the <code>selected</code> attribute.</p>
  
  <hr>
  
  <p>What I've tried so far, that hasn't worked, but so you can see my thinking:</p>
  
  <p>HTML</p>
  
  <pre><code>ng-repeat="stuff in stuffs"...
  
  &lt;select class="btn-success form-control"&gt;
      &lt;option value="companies"&gt;companies&lt;/option&gt;
      &lt;option ng-if="widget.selectedTag(stuff.tag)" value="news"&gt;news&lt;/option&gt;
      &lt;option value="people"&gt;people&lt;/option&gt;
      &lt;option value="products"&gt;products&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>this.selectedTag= function(s) {
      console.log(s);
  
      if (s = 'news'){
          return 'selected';
      }
  }
  </code></pre>
  
  <p>How would you go about this?</p>