title: Angular-ui bootstrap modal: disappearing after updating model from ajax
body: <p>I am working on templates using angular ui bootstrap (ui.boostrap.modal). The data {{property}} is created from Ajax requests.</p>
  
  <pre><code>&lt;!-- template for the modal  box--&gt;
      &lt;div&gt;&lt;a data-toggle="modal" href="#{{property.domId()}}"
             class="btn btn-default"&gt;{{property.label}}&lt;/a&gt;&lt;/div&gt;
          &lt;div id="{{property.domId()}}"
               class="modal fade" role="dialog"&gt;
              &lt;div class="modal-dialog"&gt;
                  &lt;div class="modal-content"&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;div class="row"&gt;
                          &lt;div class="col-md-12 panel panel-info"&gt;
  
                              &lt;div class="panel-heading"&gt;
                          &lt;span tooltip-placement="bottom"
                                tooltip-html-unsafe="{{property.tooltip}}"&gt;
                                {{property.label}}&lt;/span&gt;
                              &lt;/div&gt;
                              &lt;div class="panel-body"&gt;
                                  &lt;div ng-repeat="property in property.value"&gt;
                                          &lt;div ng-include="property.templateUrl"&gt;
                                          &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-footer"&gt;
                      &lt;button class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>Some buttons in the modal window updates the model in $scope and so on.</p>
  
  <p>The problem is: After returning from the ajax promise, the DOM start rebuilding the modal box. 
  At some point, deep in $digest, it fails to render an element and the modal window disappear.
  It leaves only the backdrop shadow (that prevents me to click anything).</p>
  
  <pre><code> &lt;div class="modal-backdrop fade in"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>In the Developer Tools you can see the overall DOM has been completely resolved by Angular.</p>