Created
February 21, 2014 10:02
-
-
Save acroix/9131714 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.directive("debug", function ($compile) { | |
return { | |
terminal: true, | |
priority: 100000, | |
link: function (scope, element) { | |
var clone = element.clone(); | |
element.attr("style", "color: red"); | |
clone.removeAttr("debug"); | |
var clonedElement = $compile(clone)(scope); | |
element.after(clonedElement); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment