Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
angular-recursion
Advanced tools
An Angular service which helps with creating recursive directives.
A service which makes it easy possible to have recursive Angular directives.
When an Angular directive calls itself, Angular gets into an endless loop. This service provides the logic needed to work around this.
bower install angular-recursion --save
or npm install angular-recursion --save
.bower_components/angular-recursion/angular-recursion.min.js
.RecursionHelper
module as a dependency.RecursionHelper
service and use it.Inject the RecursionHelper
service into your directive, and use it in the compile
function, as shown in the example below. The example is also available as a Plunker, so you can see it running.
angular.module('myModule', ['RecursionHelper']).directive("tree", function(RecursionHelper) {
return {
restrict: "E",
scope: {family: '='},
template:
'<p>{{ family.name }}{{test }}</p>'+
'<ul>' +
'<li ng-repeat="child in family.children">' +
'<tree family="child"></tree>' +
'</li>' +
'</ul>',
compile: function(element) {
return RecursionHelper.compile(element, function(scope, iElement, iAttrs, controller, transcludeFn){
// Define your normal link function here.
// Alternative: instead of passing a function,
// you can also pass an object with
// a 'pre'- and 'post'-link function.
});
}
};
});
FAQs
An Angular service which helps with creating recursive directives.
The npm package angular-recursion receives a total of 1,892 weekly downloads. As such, angular-recursion popularity was classified as popular.
We found that angular-recursion 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.