@hardikdabhi/ngx-spinner
Version:
Customizable loading spinner for Angular (version ng 5 and above)
20 lines (15 loc) • 545 B
text/typescript
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { ISpinnerAnimation } from '../ngx-spinner.types';
({
selector: 'app-spin2',
templateUrl: './spin2.component.html',
styleUrls: ['./spin2.component.scss']
})
export class Spin2Component implements ISpinnerAnimation {
("styles") styles: ElementRef;
config;
constructor() { }
ngOnInit() {
this.styles.nativeElement.innerHTML = `<style>.sk-fading-circle .sk-circle:before { background-color: ${this.config.color} }</style>`;
}
}