plunker <http://plnkr.co/edit/Sxq0uQ4vAZhEVDxbudoE?p=preview>

<!DOCTYPE html>
<html>
<body>
  <div ng-app="app" ng-controller="test">
    <i ng-repeat = "abc in [1,2,3]" give-w>abc<br></i>
    <br>{{ wi }}
    </div>
  <script src="https://code.angularjs.org/1.3.6/angular.js";></script>
  <script>
    console.clear();
    app = angular.module('app', []);
    app.controller('test', function($scope) {
    });
    var directives = {};
    directives.giveW = [
      function() {
        return {
          link: function(scope, element, attrs) {
            scope.wi = 5;
          }
        }
      }
    ];
    app.directive(directives);
  </script>
</body>
</html>

The value of *wi* is present the child scope of *ng-repeat*. How to 
propagate it to its parent scope so it would be present in the main scope 
and in html view? When ng-repeat is removed the *wi* value of 5 is actually 
present in html view but *ng-repeat* must remain.

How to do that? Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to