(function (angular) { var app = angular.module('batmanDelivers'); app.directive("settings", settings); settings.$inject = ['$compile'] function settings($compile) { return { restrict: 'A', link: function (scope, ele, attrs) { scope.$watch(attrs.settings, function(html) { ele.html(html); $compile(ele.contents())(scope); }); } }; } })(angular)