npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-css-loaders2

v1.0.3

Published

Angular module for Loaders.css

Downloads

23

Readme

This is a fork of angular2-loaders-css

This fork updated to Angular 7. Big thanks to the Author (https://www.npmjs.com/package/angular2-loaders-css).

Angular Loaders.css spinners

alt tag

license

This repository contains Angular 2 module that implements Loaders.css spinners.

Check out the demo of Loaders.css

Requirements

  • NPM - Node package manager

Installation

  • run npm install ngx-css-loaders2 --save
  • link Loaders.css stylesheet to your document - you can find it in /node_modules/loaders.css/, e.g. add this in your html-document:
<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";
  • import LoadersCssModule in your app's main module app.module.ts, e.g.:
// other imports
// ...
import { LoadersCssModule } from 'ngx-css-loaders2';
// ...

@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 = {
    // ...
    'ngx-css-loaders2':       'node_modules/ngx-css-loaders2',
    // ...
};
// packages tells the System loader how to load when no filename and/or no extension
var packages = {
    // ...
    'ngx-css-loaders2':       { main: 'index.js', defaultExtension: 'js' },
    // ...
};

// ...

Usage

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:

  • ball-pulse
  • ball-grid-pulse
  • ball-clip-rotate
  • ball-clip-rotate-pulse
  • square-spin
  • ball-clip-rotate-multiple
  • ball-pulse-rise
  • ball-rotate
  • cube-transition
  • ball-zig-zag
  • ball-zig-zag-deflect
  • ball-triangle-path
  • ball-scale
  • line-scale
  • line-scale-party
  • ball-scale-multiple
  • ball-pulse-sync
  • ball-beat
  • line-scale-pulse-out
  • line-scale-pulse-out-rapid
  • ball-scale-ripple
  • ball-scale-ripple-multiple
  • ball-spin-fade-loader
  • line-spin-fade-loader
  • triangle-skew-spin
  • pacman
  • ball-grid-beat
  • semi-circle-spin

Feedback

Please leave your feedback if you have noticed any issues or have a feature request.

License

The repository code is open-sourced software licensed under the MIT license.