ng-back-to-top
v1.0.1
Published
Angular 2+ Back To Top Button Component
Downloads
8
Maintainers
Readme
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></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
Use Component With Custom Design / Content
<div>
<ng-back-to-top>
<div style="font-weight: bold; padding: 10px;">
Go To Top
</div>
</ng-back-to-top>
</div>