title: Customer Directive ng-repeat scope not getting in inside function Angular JS?
body: <p>I have requirement to get the custom directive scope value.
  I am trying to access the scope.cellId inside function. it's not working. Can you please anyone give solution for this. </p>
  
  <p>Thanks in advance..</p>
  
  <p>Here the Fiddle Link:</p>
  
  <p><a href="http://jsfiddle.net/na8udkkt/" rel="nofollow">http://jsfiddle.net/na8udkkt/</a></p>
  
  <p>Here is some the controller:</p>
  
  <pre><code>var bosAppModule = angular.module('testapp', []);
  
  bosAppModule.controller('testCtrlr',['$scope', function($scope){
      $scope.layoutData =[ {layouttablecelltableid:"dsafdasfasdf"},{layouttablecelltableid:"aaaaaa"}]
  }]);
  
  bosAppModule.directive('layoutTableCellView',function($compile){
  
  var layoutTableCellObj={};
  
      linkFnTableCell=function(scope, element, attributes, controllerCtrl) {
          console.log("#####"+scope.cellId);
      };
  
      layoutTableCellObj.restrict='AE';
      layoutTableCellObj.replace='true';  
      layoutTableCellObj.scope={layoutData:'=',cellId:'@'};
      layoutTableCellObj.template="&lt;div cell-id='tablecell.layouttablecelltableid' style='background-color:grey;height:200px;'   layout-data='layoutData' ng-repeat='tablecell in layoutData' &gt;{{tablecell.layouttablecelltableid}}&lt;/div&gt;";
  
  
      layoutTableCellObj.link = linkFnTableCell;
  
      return layoutTableCellObj;  
  });
  </code></pre>
  
  <p>Here is the HTML:</p>
  
  <pre><code>&lt;div ng-app="testapp"&gt;
      &lt;div ng-controller="testCtrlr"&gt;
          &lt;layout-table-cell-view&gt; &lt;/layout-table-cell-view&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>