Created
September 21, 2014 11:45
-
-
Save alexanderjeurissen/1ad6183684a1da6ce6ae to your computer and use it in GitHub Desktop.
based on http://stackoverflow.com/a/24921498 It's a solution to the deprecation of `replace:true` attribute on directives.
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('includeReplace', function () { | |
return { | |
require: 'ngInclude', | |
restrict: 'A', /* optional */ | |
link: function (scope, el, attrs) { | |
el.replaceWith(el.children()); | |
} | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment