Sha256: e9c69889c2b7fd28cbd04ddb6697e418e32f97519918668c6b3d3aefd4312d30
Contents?: true
Size: 623 Bytes
Versions: 30
Compression:
Stored size: 623 Bytes
Contents
module = angular.module('maestrano.components.mno-compile',[]) module.directive('compile', ['$compile', ($compile) -> (scope, element, attrs) -> scope.$watch ((scope) -> # watch the 'compile' expression for changes scope.$eval attrs.compile ), (value) -> # when the 'compile' expression changes # assign it into the current DOM element.html value # compile the new DOM and link it to the current # scope. # NOTE: we only compile .childNodes so that # we don't get into infinite loop compiling ourselves return $compile(element.contents()) scope ])
Version data entries
30 entries across 30 versions & 1 rubygems