
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@ng-util/lazy
Advanced tools
Lazy load javascript, css resources for Angular.
import { Component } from '@angular/core';
import { NuLazyService } from '@ng-util/lazy';
@Component({
selector: 'app-demo',
template: ` <button *ngIf="loaded" type="button" class="btn btn-primary">Primary</button>`,
})
export class DemoComponent {
private srv = inject(NuLazyService);
loaded = false;
constructor() {
this.load();
}
async load() {
await this.srv.load([
`https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css`,
`https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.bundle.min.js`,
]);
this.loaded = true;
}
}
name | type | description |
---|---|---|
monitor(paths: string | Array<string | NuLazyResources>) | Observable<NuLazyResult[]> | Monitor for the finished of paths |
clear() | void | Clean all cached items |
load(paths: string | Array<string | NuLazyResources>) | Promise<NuLazyResult[]> | Load the specified resources, includes .js , .css |
loadScript(path: string, options?: { innerContent?: string }) | Promise<NuLazyResult> | Load a script resources |
loadStyle(path: string, options?: { ref?: string, innerContent?: string }) | Promise<NuLazyResult> | Load a style resources |
The MIT License (see the LICENSE file for the full text)
FAQs
Lazy load javascript, css resources for Angular.
We found that @ng-util/lazy demonstrated a healthy version release cadence and project activity because the last version was released less than 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.