
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@aloreljs/ngx-auto-id
Advanced tools
Automatically generates and applies the id attribute on elements
Automatic ID generator for Angular
npm install @aloreljs/ngx-auto-id@^2.0.0 # for Angular 8
npm install @aloreljs/ngx-auto-id@^1.0.0 # for Angular 7
In whatever module you want to use the directive in:
import {NgxAutoIdModule} from '@aloreljs/ngx-auto-id';
@NgModule({
imports: [NgxAutoIdModule]
})
export class MyFancyModule {}
<div ngx-auto-id></div>
<div ngx-auto-id></div>
Outputs:
<div id="el-1"></div>
<div id="el-2"></div>
<div ngx-auto-id></div>
<div ngx-auto-id id-prefix="fancy-"></div>
Outputs:
<div id="el-3"></div>
<div id="fancy-1"></div>
You might want to replace the default "el-" prefix with your own; in this case, you should provide a value for the NGX_AUTO_ID_DEFAULT_PREFIX token:
import {NgModule} from '@angular/core';
import {NGX_AUTO_ID_DEFAULT_PREFIX} from '@aloreljs/ngx-auto-id';
@NgModule({
//... declarations etc
providers: [{
provide: NGX_AUTO_ID_DEFAULT_PREFIX,
useValue: 'my-prefix-'
}]
})
export class AppModule {
}
<div [ngx-auto-id]="false" #autoID="ngx-auto-id"></div> <!-- Must be strictly false, not falsy -->
<div [id]="autoID.toString()"></div>
<div [id]="autoID"></div> <!-- The .toString() method returns the ID -->
Outputs:
<div></div>
<div id="el-4"></div>
<div id="el-4"></div>
<label [for]="idUsername">Username:</label>
<input ngx-auto-id #idUsername="ngx-auto-id"/>
FAQs
Automatically generates and applies the id attribute on elements
The npm package @aloreljs/ngx-auto-id receives a total of 12 weekly downloads. As such, @aloreljs/ngx-auto-id popularity was classified as not popular.
We found that @aloreljs/ngx-auto-id 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.