Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/anedomansky/ngx-icon
An Angular component for displaying SVG icons.
ngx-icon | Angular |
---|---|
current | >= 16 |
npm install @anedomansky/ngx-icon
You have to add all your icons to the NgxIconService
in order to display them.
Please remove all height
and width
attributes from the <svg>
element beforehand.
Furthermore, you have to provide the HttpClient
in your application.
main.ts
:
import { NgxIconService } from "@anedomansky/ngx-icon";
import { provideHttpClient } from "@angular/common/http";
import { APP_INITIALIZER } from "@angular/core";
import { bootstrapApplication } from "@angular/platform-browser";
import { AppComponent } from "./app/app.component";
bootstrapApplication(AppComponent, {
providers: [
provideHttpClient(),
{
provide: APP_INITIALIZER,
useFactory: (iconService: NgxIconService) => () => {
iconService.addIcon("cart", "assets/");
iconService.addIcon("camera", "assets/");
},
deps: [NgxIconService],
multi: true,
},
],
});
app.component.html
:
<div class="app">
<ngx-icon name="cart"></ngx-icon>
<ngx-icon name="camera"></ngx-icon>
</div>
app.component.ts
:
import { NgxIconComponent } from "@anedomansky/ngx-icon";
import { Component } from "@angular/core";
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.scss"],
standalone: true,
imports: [NgxIconComponent],
})
export class AppComponent {}
You can alter the appearance (height, width, etc.) of the icons.
Additionally, there is a CSS Custom Property for the icon's height
that can easily be updated.
app.component.scss
:
.app ::ng-deep ngx-icon {
--ngx-icon-size: 2rem;
}
FAQs
Unknown package
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.