Skip to content

Instantly share code, notes, and snippets.

@jakerb
Created January 29, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakerb/6c2d2def2fd227e3b07b53fffb6a5de7 to your computer and use it in GitHub Desktop.
Save jakerb/6c2d2def2fd227e3b07b53fffb6a5de7 to your computer and use it in GitHub Desktop.
Unwrap template includes
/**
* Provide some Javascript to be included within your application.
*
* @link https://myappuccino.com/
* @since 1.0.0
*
* @package Appuccino
*/
(function() {
if(typeof $appuccino !== 'undefined') {
$appuccino.application.module.module().directive('includeReplace', function () {
return {
require: 'ngInclude',
restrict: 'A', /* optional */
link: function (scope, el, attrs) {
el.replaceWith(el.children());
}
};
});
}
}();
<ng-include src="app.app.base_url + 'partials/header.html'" include-replace></ng-include>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment