
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
ngx-send-templates
Advanced tools
Small Angular library to easily send templates to different locations.
Small Angular library to easily send templates to different locations.
Install via npm install ngx-send-templates --save
and import NgxSendTemplatesModule
in your AppModule.
You can now use the directives *sendTemplate
and *receiveTemplate
or manually use the SendTemplatesService
.
<div *sendTemplate>Send this to the default location</div>
<div *sendTemplate="'leftNav'">Send this div to the left nav!</div>
<ng-container *receiveTemplate></ng-container> <!-- uses default stream -->
<p *receiveTemplate="'leftNav'">This is a placeholder while there is no template!</p>
Templates are sent via
BehaviourSubjects
so you will always receive the latest template.
*sendTemplate
The *sendTemplate
directive takes an observable as input with sendOn
. Every time the observable emits, the template wil be sent.
Furthermore you can apply a pipe
to change the observable behaviour.
<div *sendTemplate="'leftNav'; sendOn: button$; pipe: delayBy(5000)">This will be sent 5s after the button was clicked.</div>
<button (click)="button$.next()">Send Template</button>
button$ = new Subject<void>();
delayBy = (by: number) => (source$) => source$.pipe(
delay(by)
);
*receiveTemplate
The *receiveTemplate
directive also takes a pipe
input, to change the behaviour on the receiving end.
<div *receiveTemplate="'confirm'; pipe: confirmTemplate">Placeholder ...</div>
confirmTemplate = (source$) => source$.pipe(
map(val => confirm("Do you really want to show this?") ? val : undefined)
)
Check out the docs for use cases and code examples.
FAQs
Small Angular library to easily send templates to different locations.
The npm package ngx-send-templates receives a total of 3 weekly downloads. As such, ngx-send-templates popularity was classified as not popular.
We found that ngx-send-templates 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.