<div ng-controller="myCtrl"> {{ data }} <my-directive></my-directive> </div>
var myApp = angular.module('myApp', []); myApp.controller('myCtrl', ['$scope', function ($scope) { $scope.data = 'AAA'; }]); myApp.directive('myDirective', function() { return { restrict: 'E', scope: true, template: '<div>{{data}}</div>', link: function(scope) { scope.data = 'BBB'; } } });