I have a requirement How to create a spinner common component with a spinner service(costume service) file for angular 5. that once I click on button and drop down also , sp
This is kind of an easy and ready made solution. Download font awesome CSS icon pack from here:
https://fontawesome.com/v4.7.0/get-started
Then include the 'font-awesome.min.css' file from the css folder within the head tags of your "index.html":
Create a spinner component that you can resize and reuse everywhere:
spinner.component.ts:
import { Component, Input } from '@angular/core';
@Component
({
selector : 'spinner',
templateUrl : './spinner.component.html'
})
export class spinnerComponent
{
@Input () spinnerSize;
}
spinner.component.html:
In any template where you would wish to use the spinner just include the following: