/ng-bootstrap-spinner

🍺 Hi there, Bootstrap Spinners for Angular lovers <3, Thanks...

Primary LanguageHTMLMIT LicenseMIT

ng-bootstrap-spinner

🍺 Hi there, Ng Bootstrap Spinner for Angular Lovers <3, Thanks...

NPM NPM JavaScript Style Guide

Installation

Using NPM:

npm i ng-bootstrap-spinner

npm i bootstrap

In you angular.json import bootstrap css

"styles": [
    // "src/styles.scss",
    "./node_modules/bootstrap/dist/css/bootstrap.min.css"
],

Or

In your styles.scss file import bootstrap css

/* You can add global styles to this file, and also import other style files */
@import "bootstrap/dist/css/bootstrap.min.css";

Usage

Import direct in your app.module.ts file:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

//import NgSpinnerModule from ng-bootstrap-spinner
import { NgSpinnerModule } from 'ng-bootstrap-spinner';

@NgModule({
  declarations: [
  ],
  imports: [
    BrowserModule,
    //import your NgSpinnerModule here
    NgSpinnerModule
  ],
  providers: []
})
export class AppModule { }

Then use wherever you want !! Goodluck:

   <ng-spinner size="5" type="border" color="warning"></ng-spinner>

Note

  • size: Size size in rem
  • color: You can give any bootstrap color - primary, secondary, danger etc...
  • type: Add spinner type - grow or border

Author

Ajay Marathe

Copyright and License

Copyright 2019 Ajay Marathe. Code released under the MIT license.