title: Materialize button inside ng-repeat not triggering modal
body: <p>I am using materialize.js for a project and I have an ng-repeat element with contents of my user array:</p>
  
  <pre><code>         `&lt;div id="userObj" ng-repeat="user in allUsers"&gt;`
  </code></pre>
  
  <p>The standard button <code>&lt;a class="waves-effect waves-light btn modal-trigger" href="#modal1"&gt;Modal&lt;/a&gt;</code> works when placed outside of the ng-repeat, but it needs to be present for every user in order to open an edit window. However, every time I put it inside the repeat directive the #modal1 is not called.</p>
  
  <p>Has anyone else ran into problems with the materialize moda-trigger button?</p>
  
  <p>EDITS</p>
  
  <p>IN directives.js</p>
  
  <pre><code>    app.directive('repeatDone', function() {
         return function(scope, element, attrs) {
             if (scope.$last) { // all are rendered
                 scope.$eval(attrs.repeatDone);
             }
         }
      });
  </code></pre>
  
  <p>In app.js:</p>
  
  <pre><code>var myPosts = $firebaseArray(ref);
  $scope.allUsers = allUsers;
  
  $scope.initModals = function() {
  $('.modal-trigger').leanModal(); // Initialize the modals
  }
  
  
  //EDIT User
  
  
  
     $scope.editPost = function(id) {
  
      $scope.update = function() {
        var fb = new Firebase("https://&lt;DATASOURCE&gt;.firebaseio.com/AllUsers/" + $scope.postToUpdate.$id);
        var user = $firebaseObject(fb);
        user.Name = $scope.postToUpdate.Name;
        user.Lastname = $scope.postToUpdate.Lastname;
        user.Bio = $scope.postToUpdate.Bio;
        user.$save().then(function(ref) {
            $('#editModal').modal('hide');
            console.log($scope.postToUpdate.Title);
          }, function(error) {
          console.log("Error:", error);
      });
  }
  </code></pre>
  
  <p>The post ng-repeat</p>
  
  <pre><code>&lt;div ng-controller="postController"&gt;
             &lt;div class="list-group" id="userObj"  ng-repeat="user in allUsers" repeat-done="initModals()"&gt;
               &lt;h3&gt;{{ user.Name }}&lt;/h3&gt;
               &lt;h5&gt;{{user.LastName}}&lt;/h5&gt;
               &lt;div ng-bind-html="post.Bio"&gt;{{user.Bio}}&lt;/div&gt;
               &lt;button class="waves-effect waves-light btn modal-trigger" ng-click="editPost(post.$id)"&gt;EDIT&lt;/button&gt;
               &lt;!-- Button trigger modal --&gt;
  
             &lt;/div&gt;
  </code></pre>
  
  <p>MODAL WINDOW</p>
  
  <pre><code>&lt;!--material modal--&gt;
              &lt;div class="modal" id="editModal"&gt;
                  &lt;div class="modal-content"&gt;
                    &lt;div class="modal-header"&gt;
                      &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
                      &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-body"&gt;
                      &lt;form role="form"&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label for="speaker-name" class="control-label"&gt;Speaker:&lt;/label&gt;
                              &lt;input type="text" class="form-control" id="title" ng-model="postToUpdate.Name"&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label for="speaker-lastname" class="control-label"&gt;Speaker Last Name:&lt;/label&gt;
                              &lt;textarea class="form-control" id="message-text" ng-model="postToUpdate.Lastname"&gt;&lt;/textarea&gt;
                          &lt;/div&gt;
                          &lt;div class="form-group"&gt;
                              &lt;label for="message-text" class="control-label"&gt;Biography:&lt;/label&gt;
                              &lt;textarea class="form-control" id="message-text" ng-model="postToUpdate.Bio"&gt;&lt;/textarea&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                    &lt;/div&gt;
                    &lt;div class="modal-footer"&gt;
                      &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                      &lt;button type="button" ng-click="update()" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;!--//material modal--&gt;
  </code></pre>
  
  <p>Materialize dependecies:</p>
  
  <pre><code>&lt;!-- Compiled and minified JavaScript --&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"&gt;&lt;/script&gt;
  
   &lt;script src="https://code.angularjs.org/1.4.7/angular-sanitize.min.js"&gt;&lt;/script&gt;
  </code></pre>