
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-renderer
Advanced tools
Advanced abstract renderer for Angular
This is Work In Progress
$ npm install ngx-renderer --save
Also please make sure you have latest version of tslib
library
Import AdvancedRendererModule
in your app module:
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AdvancedRendererModule } from 'ngx-renderer';
@NgModule({
imports: [
BrowserModule,
AdvancedRendererModule,
]
})
export class AppModule { }
Then in your component/directive/service inject AdvancedRenderer
and use it:
import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core';
import { AdvancedRenderer, AdvancedRendererMethod, elementExpression } from 'ngx-renderer';
@Component({
selector: 'my-component',
template: `<input type="text" #myInput placeholder="This will have auto-focus">`
})
class MyComponent implements AfterViewInit {
@ViewChild('myInput') myInput: ElementRef;
constructor(private renderer: AdvancedRenderer) { }
ngAfterViewInit() {
// This will be safely executed on Browser UI thread (or ignored if not available)
this.renderer.execute('input.focus()', { input: elementExpression(this.myInput) })
.then(() => console.log('Input got focus! Yay!!'));
}
}
All you need to do is update your AppModule. Your application logic code remains untouched!
Here is the change in your AppModule
which now runs on Webworker thread:
import { NgModule } from '@angular/core';
import { WorkerAppModule } from '@angular/platform-webworker';
import { AdvancedRendererWorkerModule } from 'ngx-renderer';
@NgModule({
imports: [
WorkerAppModule,
AdvancedRendererWorkerModule,
]
})
export class AppInWorkerModule { }
And here is the change on UI bootstrapping code:
import { bootstrapWorkerUi } from '@angular/platform-webworker';
import { ADVANCED_RENDERER_UI_PROVIDERS } from 'ngx-renderer';
bootstrapWorkerUi('app-worker.js', ADVANCED_RENDERER_UI_PROVIDERS);
If you want to run your application on the server again just update your AppModule
:
import { NgModule } from '@angular/core';
import { AdvancedRendererNoopModule } from 'ngx-renderer';
@NgModule({
imports: [
AdvancedRendererNoopModule,
]
})
export class AppInWorkerModule { }
MIT © Alex Malkevich
FAQs
Advanced abstract renderer for Angular
The npm package ngx-renderer receives a total of 1 weekly downloads. As such, ngx-renderer popularity was classified as not popular.
We found that ngx-renderer 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.