Skip to content

Instantly share code, notes, and snippets.

@alexanderjeurissen
Created September 21, 2014 11:45
Show Gist options
  • Save alexanderjeurissen/1ad6183684a1da6ce6ae to your computer and use it in GitHub Desktop.
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.
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