🍺 Hi there, Ng Bootstrap Spinner for Angular Lovers <3, Thanks...
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";
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>
- size: Size
size in rem
- color: You can give any bootstrap color -
primary, secondary, danger etc...
- type: Add spinner type -
grow
orborder
Ajay Marathe
Copyright 2019 Ajay Marathe. Code released under the MIT license.