
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.
route-with-dynamic-outlets
Advanced tools
A template for creating npm packages using TypeScript and VSCode
Some bigger web applications provides panels/tabs interfaces. So far the implementations which I have saw were based on singular route with implementations which comes on top of it. While this solution works for simple case it cripples all advanced features which angular router has to offer (especially nestead routes). This library provides laverages angular router outlets to adress previous drawbacks. Curently it is rather proof on concept but it shows clean direction on how advanced panels/tabs interfaces can be implemented.
npm install route-with-dynamic-outlets
import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {PlaceholderComponent} from "./placeholder/placeholder.component";
import {createRouteWithDynamicOutlets} from "../route-with-dynamic-outlets/route-with-dynamic-outlets";
import { Component } from '@angular/core';
import { ActivatedRoute, RouterModule } from '@angular/router';
import { map, Observable, switchMap } from 'rxjs';
import { CommonModule } from '@angular/common';
import { OutletsMap } from '../../src';
@Component({
standalone: true,
selector: 'app-dynamic-outlets',
template: ```
<a [routerLink]="[{ outlets: { A: [''], B: [''] } }]">Open A and B</a>
<router-outlet *ngFor="let outlet of outlets$ | async" [name]="outlet">
{{outlet}}
</router-outlet>
```,
imports: [RouterModule, CommonModule],
})
export class DynamicOutletsComponent {
constructor(protected activatedRoute: ActivatedRoute) {}
outlets$ = this.activatedRoute.data.pipe(
switchMap(({ outlets$ }) => outlets$ as Observable<OutletsMap>),
map(outlets => Object.keys(outlets ?? {}))
);
}
const routes: Routes = [
createRouteWithDynamicOutlets({
path: '',
component: DynamicOutletsComponent,
dynamicOutletFactory: () => ({
path: '',
component: PlaceholderComponent,
})
})
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AppWorkspaceRoutingModule {
}
Routes with dynamic outlets still can be nested.
FAQs
A template for creating npm packages using TypeScript and VSCode
We found that route-with-dynamic-outlets 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.