ng-back-to-top
Angular 2+ Back To Top Button Component
( This Library Is Using Angular CLI's Library Generation Command )
How to:
Install npm
npm install ng-back-to-top --save
Simple Example
Import Module
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgBackToTopModule } from 'ng-back-to-top';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
NgBackToTopModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Use Component
<div>
<ng-back-to-top bgColor="orange"></ng-back-to-top>
</div>
API
input property
color
property is available to change the color of default button arrow
bgColor
this property can change the background color of back to top button
Any contributions are appreciated.