data: '=' }, template: '{{ ctrl.foo }} {{ ctrl.data.xx }}', controllerAs: 'ctrl', controller: function ($scope) { this.foo = 'this is foobar directive' // handle data var self = this $scope.$watch('data', function (data) { self.data = data }) } } }) 2015.7 6