Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
angular2-loaders-css
Advanced tools
This repository contains Angular 2 module that implements Loaders.css spinners.
Check out the demo of Loaders.css
npm install angular2-loaders-css --save
<link rel="stylesheet" href="node_modules/loaders.css/loaders.min.css">
or import it in app.scss, e.g.:
@import "node_modules/loaders.css/src/loaders";
LoadersCssModule
in your app's main module app.module.ts
, e.g.:// other imports
// ...
import { LoadersCssModule } from 'angular2-loaders-css';
// ...
@NgModule({
imports: [
// other imports
// ...
LoadersCssModule,
// ...
]
})
That should be enough if you use Webpack to bundle JavaScript.
Otherwise you'll have to edit systemjs.config.js
to set correct path, e.g.:
// below you can see an example of map and packages sections in systemjs.config.js
// ...
// map tells the System loader where to look for things
var map = {
// ...
'angular2-loaders-css': 'node_modules/angular2-loaders-css',
// ...
};
// packages tells the System loader how to load when no filename and/or no extension
var packages = {
// ...
'angular2-loaders-css': { main: 'index.js', defaultExtension: 'js' },
// ...
};
// ...
Just use LoadersCssComponent
in a template, e.g.:
import { Component } from '@angular/core';
@Component({
template: `
<h2>Home component header</h2>
<loaders-css [loader]="'square-spin'" [loaderClass]="'my-loader'"></loaders-css>
`
})
export class HomeComponent {}
Important! If you don't see spinner and there are no errors in console - it can be because spinner's color is the same as the background's color - usually it's white.
You can pass loaderClass
-attribute and specify CSS class for a loader if you want to change loader's color, e.g.:
.loader .my-loader {
background-color: #D32F2F;
}
Note that you have to use loader-attribute to choose a loader that'll be displayed, possible values are:
Please leave your feedback if you have noticed any issues or have a feature request.
The repository code is open-sourced software licensed under the MIT license.
FAQs
Angular 2 module for Loaders.css
We found that angular2-loaders-css 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.