Skip to content

Instantly share code, notes, and snippets.

@lauripiispanen
Created March 26, 2014 15:11
Show Gist options
  • Save lauripiispanen/9785606 to your computer and use it in GitHub Desktop.
Save lauripiispanen/9785606 to your computer and use it in GitHub Desktop.
.directive 'my-magix-directivix', ['$compile', ($compile) ->
compile: (element, attrs) ->
element.attr("my-other-directive", "and-some-settings")
element.attr("ng-model", "foobar")
element.removeAttr("my-magix-directivix")
element.removeAttr("data-my-magix-directivix")
{
pre: ->
post: ($scope, element) ->
$compile(element)($scope)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment