Coder Social home page Coder Social logo

f22hd / simple-ngx-loading-bar Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 842 KB

A library that allows to a developer using loading bar indicator for getting better user expeirence.

Home Page: http://simple-ngx-loading-bar.surge.sh/

JavaScript 14.43% TypeScript 71.84% HTML 10.97% CSS 2.76%
angular typescript angular-lib

simple-ngx-loading-bar's Introduction

SimpleLoadingBar

An angular library allows a developer to show the loading bar at the top of the app, such as indicating an Http request and showing the loading bar until request is finished.

About Library

it contains a single component that should be added into your parent component app or header app. To make sure the loading bar will be on top of the app, the component styled with an absolute position so always will be top and above on all elements.

Installation

  • run this command in your terminal
npm i simple-ngx-loading-bar
  • import the module in your app module
import { SimpleNgxLoadingBarModule } from 'simple-ngx-loading-bar';
@NgModule({
  declarations: [...],
  imports: [
   ...,
    SimpleNgxLoadingBarModule.forRoot({
      color: 'red' // define your custom color by any background property value.
    })
  ],
  providers: [],
  bootstrap: [...]
})
export class AppModule { }

  • add the selector into your component html
 <simple-ngx-loading-bar></simple-ngx-loading-bar>
  • finally , we have it's service for controlling visiblity of the loading bar.
import { SimpleNgxLoadingBarService } from 'simple-ngx-loading-bar';

export class AppComponent {
  constructor(private loader: SimpleNgxLoadingBarService) { }

  start() {
  // show loading indicator
    this.loader.show();
  }

  complete() {
  // hide loading indicator
    this.loader.hide();
  }

That's set.

Contribution

I will be more than happy to join me in this project. just open via codebase and do your magic then make pull request.

simple-ngx-loading-bar's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.