title: refreshing values with ng-init
body: <p>hey everyone i have problem dealing with ng-init or maybe ng-init isn't the solution , all right i'm using ng-init to initialize data inside my dynamic combobox like this : </p>
  
  <pre><code>    &lt;li class="list-group-item" ng-repeat="l in list |orderBy: 'idfonction' as filtered_result track by l.idfonction " &gt;   
  
      &lt;div class="row"&gt;
      &lt;div class="col-md-8"&gt;
  
  &lt;h5&gt;{{l.nomfonction}} : &lt;/h5&gt;
  
      &lt;/div&gt;
  
  
    &lt;div class="col-md-4" &gt; 
          &lt;div class="input-group"&gt;
  
  
   &lt;select ng-init="newObject[l.idfonction] = inifonction[0]"  ng-model="newObject[l.idfonction]"  ng-options="  fct for fct in inifonction   "  class="form-control"&gt;
  
  
          &lt;/select&gt;
              &lt;span class="input-group-btn" &gt;
              &lt;button  type="submit" class="btn btn-primary form-control" ng-disabled="newObject[l.idfonction] != 'KO' " data-toggle="collapse" data-target="#mycollapse_{{l.idfonction}}"&gt;
          &lt;i class="glyphicon glyphicon-chevron-down"&gt;&lt;/i&gt;
              &lt;/button&gt;
              &lt;/span&gt;
  
  
          &lt;/div&gt;
  
   &lt;/div&gt;
  </code></pre>
  
  <p>my scope data : </p>
  
  <pre><code> $scope.inifonction = ["N/P","N/A","OK","KO"];
  </code></pre>
  
  <p>and my output of this <code>ng-model="newObject[l.idfonction]"</code> look like this : </p>
  
  <pre><code>Object {1: "N/A", 2: "OK", 3: "N/A", 4: "N/P", tab: "N/P"}
  </code></pre>
  
  <p>and am getting this as a result : 
  <a href="https://i.stack.imgur.com/bMy7m.png" rel="nofollow noreferrer">http://i.stack.imgur.com/bMy7m.png</a></p>
  
  <p>for now everything is great ng-init is working great and it's initializing data 
  but the result in the picture is inside a modal the modal is coming out of this table every time i click on that link i get a modal : </p>
  
  <p><a href="https://i.stack.imgur.com/F4N3a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F4N3a.png" alt="enter image description here"></a></p>
  
  <p>now here comes the problem when i select something in one of the select box like this : 
   <a href="https://i.stack.imgur.com/eNC6X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eNC6X.png" alt="enter image description here"></a> </p>
  
  <p>then i open another link ( exemple : the one below PDCR3 from  the table ) , the modal shows up with the selection that i just made , what i mean why it's not executing that ng-init everytime i click on the link why it conserving what i just edited .</p>
  
  <p>Thanks to any support .   </p>