angular.module('myApp',[]) .controller('MainCtrl', function($scope) { $scope.foo = 0; $scope.bar = 0; $scope.hello = "Hello"; $scope.setHello = function() { $scope.hello = "World"; }; }).directive('clickable', function() { return { restrict: "E", scope: { foo: '=', bar: '=' }, template: '