title: How to access scope outside of ng-repeat in a directive
body: <p>I have an angular directive and a list of items:</p>
  
  <pre><code>&lt;li ng-repeat="x in topics"&gt;
    &lt;p change-content-on-click&gt;{{ x.name }}&lt;/p&gt;
  &lt;/li&gt;
  
  app.directive('changeContentOnClick', function(TopicService) {
     return{
         restrict: 'A',
         link: function(scope, element) {
             element.bind('click', function(){
                 scope.message = "hello";
                 scope.$apply();
             });
         }
     }
  });
  </code></pre>
  
  <p>What I need to do is bind <code>{{ message }}</code> which is outside the repeat to a clicked item in the list. How can I do that? I went through a lot of documentation but I couldn't find.</p>