All Projects → amitmahida92 → Ng4 Loading Spinner

amitmahida92 / Ng4 Loading Spinner

Licence: mit
Angular 4 custom async loading spinner.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ng4 Loading Spinner

spinnies
Node.js module to create and manage multiple spinners in command-line interface programs
Stars: ✭ 111 (+50%)
Mutual labels:  spinner, loading-bar, loading-spinner
Whirl
CSS loading animations with minimal effort!
Stars: ✭ 774 (+945.95%)
Mutual labels:  spinner, loading-spinner, loading-bar
Vue Progress Path
Progress bars and loading indicators for Vue.js
Stars: ✭ 309 (+317.57%)
Mutual labels:  spinner, loading-spinner, loading-bar
material-circular-loader
Material Circular Loader in SCSS like a boss. Demo: http://codepen.io/YuRen/details/KdKKax
Stars: ✭ 13 (-82.43%)
Mutual labels:  spinner, loading-spinner
ncg-crud-ngx-md
Angular 4+ Material Design CRUD/Admin app by NinjaCodeGen http://DNAfor.NET
Stars: ✭ 36 (-51.35%)
Mutual labels:  angular4, angular-2
busy-load
A flexible loading-mask jQuery-plugin
Stars: ✭ 76 (+2.7%)
Mutual labels:  spinner, loading-spinner
Angular4-seed
Angular 4 Seed for Angular Forms
Stars: ✭ 37 (-50%)
Mutual labels:  angular4, angular-2
Ng Http Loader
🍡 Smart angular HTTP interceptor - Intercepts automagically HTTP requests and shows a spinkit spinner / loader / progress bar
Stars: ✭ 327 (+341.89%)
Mutual labels:  spinner, angular4
React Epic Spinners
Reusable react components for epic-spinners
Stars: ✭ 280 (+278.38%)
Mutual labels:  spinner, loading-spinner
Epic Spinners
Easy to use css spinners collection with Vue.js integration
Stars: ✭ 3,548 (+4694.59%)
Mutual labels:  spinner, loading-spinner
Ngx Spinner
A library for loading spinner for Angular 4/5/6/7/8/9/10.
Stars: ✭ 545 (+636.49%)
Mutual labels:  spinner, loading-spinner
Iprogresshud
An elegant, lightweight and responsive progress HUD for iOS app with very simple usage. Available 32 indicators by NVActivityIndicatorView.
Stars: ✭ 66 (-10.81%)
Mutual labels:  loading-spinner, loading-bar
cpp-indicators
A very simple, easy-to-use, and single-header-only C++ library for console based indicators (loading spinners)
Stars: ✭ 13 (-82.43%)
Mutual labels:  spinner, loading-spinner
ngx-print
🖨️ A plug n' play Angular (2++) library to print your stuff
Stars: ✭ 124 (+67.57%)
Mutual labels:  angular4, angular-2
ng2-timezone-selector
A simple Angular module to create a timezone selector using moment-timezone.
Stars: ✭ 12 (-83.78%)
Mutual labels:  angular4, angular-2
react-native-spinner-button
React Native button component with multiple animated spinners
Stars: ✭ 105 (+41.89%)
Mutual labels:  spinner, loading-spinner
laravel5Angular4
Laravel 5.4 & Angular 4.3.4
Stars: ✭ 37 (-50%)
Mutual labels:  angular4, angular-2
Aframe Preloader Component
A preloading bar that automatically displays while scene assets load.
Stars: ✭ 27 (-63.51%)
Mutual labels:  spinner, loading-bar
Bootstraping Ngx Admin Lte
Angular2,4,6 project with AdminLTE dashboard template (using angular, angular-cli and ngx-admin-lte ) Formerly called 'ng2-admin-lte'.
Stars: ✭ 479 (+547.3%)
Mutual labels:  angular4, angular-2
Respin
React SVG loading spinner based on jxnblk.com/loading
Stars: ✭ 21 (-71.62%)
Mutual labels:  spinner, loading-spinner

ng4-loading-spinner

Angular 4/5/6/7 custom async loading spinner with two simple methods for your asychronous calls. Custom loading template & loading text inputs are also available.

support support support David license

Docs Link

Link to ng4-loading-spinner

Default Spinner Example

Open Plunker

Custom Template Example

Open Plunker

Installation

npm i ng4-loading-spinner --save

Description

You can override the css for your customized spinner.

You can also configure your own threshold to show spinner only for more expensive processes!

Supports latest Angular v5.x

Supports latest Angular v6.x

Supports latest Angular v7.x

Supports latest Angular cli v1.5.x

Supports latest Angular cli v6.x

Supports latest Angular cli v7.x

New Updates

#loading-spinner-text / .loading-spinner-text : Both id and class attributes given to spinner text component to customize the loading text css

[timeout] The time after which spinner will be hidden. Default is 5000 ms

Resolved issues related to templates and loading text.

Usage

Import module to your application master module

import { Ng4LoadingSpinnerModule } from 'ng4-loading-spinner';

Make an import entry as shown below

imports: [ Ng4LoadingSpinnerModule.forRoot() ]

Include spinner component to your root level component.

<ng4-loading-spinner> </ng4-loading-spinner>

Import Ng4LoadingSpinnerService to the component where you want to show the spinner.

import { Ng4LoadingSpinnerService } from 'ng4-loading-spinner';

Inject dependancy

    constructor(
        private spinnerService: Ng4LoadingSpinnerService
    ) { }

Use show() method to display the loading spinner.

this.spinnerService.show();

Use hide() method to hide the loading spinner once the processing is done.

this.spinnerService.hide();

Example

    this.spinnerService.show();
    this.http.get(GLOBAL['CONFIG_URL'])
        .subscribe(data => {
            this.spinnerService.hide();
        });

Custom template

[template] : Accepts HTML which generates the loading spinner. You can apply additional css to design your own spinner, or can just pass *.gif image to show the loading spinner.

[loadingText] : Accepts a string to display the text while the loading process.

[zIndex] : Accepts a z-index css property for loading text.

[threshold] : Accepts time in milliseconds for threshold through which you can conditionally show the spinner only for expensive calls. Default is 500 ms.

[timeout] : Accepts time in milliseconds to hide the spinner automatically. Default is 5000 ms.

default [loadingText] text would be blank.

app.component.html : both are optional if not provided default would be shown.

<ng4-loading-spinner [threshold]="2000" [timeout]="4000" [template]="template" [loadingText]="'Please wait...'" [zIndex]="9999"></ng4-loading-spinner>

[threshold]="2000" : This will show the loading bar for the only processes which will take time more 2 secs.

app.component.ts

template: string =`<img src="http://pa1.narvii.com/5722/2c617cd9674417d272084884b61e4bb7dd5f0b15_hq.gif" />`

License

MIT © Amit Mahida

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].