Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ngx-fi-styles-loader
Advanced tools
A streamlined approach to load styles dynamically
npm i lodash --save
npm i @types/lodash --save-dev
npm i ngx-fi-lodash --save
npm i ngx-fi-styles-loader --save
import { NgModule } from "@angular/core";
import { NgxFiStylesLoaderModule } from "ngx-fi-styles-loader";
@NgModule({
imports: [NgxFiStylesLoaderModule], // for consumption within the scope of the module
exports: [NgxFiStylesLoaderModule] // if propagation is required
})
export class SomeModule {}
import { StyleHandlingMode, StylesLoaderService } from "ngx-fi-styles-loader";
export class SomeClass {
constructor(private loaderService: StylesLoaderService) {}
}
import { NgxFiStylesLoaderTestingModule, StylesLoaderMockService, StylesLoaderService } from "ngx-fi-styles-loader";
describe('TestingTitle', () => {
let stylesLoaderService: StylesLoaderMockService;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [NgxFiStylesLoaderTestingModule]
});
stylesLoaderService = TestBed.get(StylesLoaderService);
}));
}));
}));
components:
StylesLoaderComponent
/ styles-loader
: to be used when managed loading of styles is requiredStylesLoaderRawComponent
/ styles-loader-raw
: to be used when un-managed loading of styles is requiredenums:
StyleHandlingMode
PassThrough
: just passes the url to be loadedVerifiedPassThrough
: downloads content first, passed the url to be loaded on successLiteral
: downloads the content and passes it as an object url; should not be used when stylesheet contains any relative paths referencing assetsservices:
StylesLoaderService
: used in conjuction with StylesLoaderComponent
to load styles; in addition, info regarding the loading status of a style(s) are provided
export interface IStylesLoaderService {
loadingStyles$: Observable<{ [key: string]: string }>;
isStyleLoading(url: string): boolean;
isStyleLoading$(url: string): Observable<boolean>;
areStylesLoading(urls: string[]): boolean;
areStylesLoading$(urls: string[]): Observable<boolean>;
getStyle$(url: string, styleHandlingMode?: StyleHandlingMode): Observable<string>;
}
FAQs
A streamlined approach to load styles dynamically
The npm package ngx-fi-styles-loader receives a total of 0 weekly downloads. As such, ngx-fi-styles-loader popularity was classified as not popular.
We found that ngx-fi-styles-loader 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.