
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
angular-distribute-transclude
Advanced tools
This is an angularjs directive which offers you a simple way to transclude your html to specific places in your template
This is an angularjs directive which offers you a simple way to transclude your html to specific places in your template
Here is an example:
The directive template:
<div class="my-custom-header">
<div content-select=".header-profile">
The matching element will be appended ;)
</div>
<div>Some directive content....</div>
<p>Minions ipsum ullamco incididunt jeje dolore nisi aaaaaah wiiiii aliqua esse. Irure uuuhhh commodo wiiiii officia bee do bee do bee do sit amet potatoooo veniam. Uuuhhh ut labore jiji. Bappleees butt officia ut bananaaaa esse hana dul sae aliqua chasy. Ad commodo sit amet underweaaar quis po kass para tú enim aute jiji poopayee. Tatata bala tu daa nisi dolore para tú dolor. Ullamco po kass daa exercitation tank yuuu! Ullamco. </p>
<div content-select=".header-navbar" content-replace>
If i use "trans-replace" my element will be replaced and this content removed!
</div>
Nice Header :)
</div>
If you are using distribute-transclude, don't add the property transclude to your directive config!!! Because angular can only handle one transclude on an element and this will be done by distribute-transclude
app.directive('myCustomHeader', function() {
return {
scope: {
v1: '=',
v2: '@',
},
restrict: 'E',
require: 'distributeTransclude',
// transclude: true <-- Don't do this!
controller: function() {},
controllerAs: 'vm',
bindToController: true,
templateUrl: 'my-custom-header.directive.template.html',
};
});
<my-custom-header distribute-transclude>
<div class="header-profile">Header Profile</div>
<nav class="header-navbar">
Some nav buttons
</nav>
All the other elements which are not matching
<div>will be never transcluded!!!</div>
</my-custom-header>
FAQs
This is an angularjs directive which offers you a simple way to transclude your html to specific places in your template
We found that angular-distribute-transclude demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.