implemented perfect scrollbar
This commit is contained in:
1 parent
06be888123
commit
16b86b4ca5
6 files changed
+177
-32
No files matched your search
@@ -1,11 +1,12 @@
|
||||
<app-navbar></app-navbar>
|
||||
<app-sidebar></app-sidebar>
|
||||
<main class="main-wrapper">
|
||||
<div class="main-content">
|
||||
<main class="main-wrapper" id="main-wrapper" #scrollContainer>
|
||||
<div class="main-content" id="main-content">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
<footer></footer>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
$(".data-attributes span").peity("donut")
|
||||
</script>
|
||||
</script>
|
||||
@@ -1,10 +1,18 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';
|
||||
import PerfectScrollbar from 'perfect-scrollbar';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.css'
|
||||
styleUrl: './app.component.css',
|
||||
})
|
||||
export class AppComponent {
|
||||
export class AppComponent implements AfterViewInit {
|
||||
@ViewChild('scrollContainer', { static: true }) scrollContainer!: ElementRef;
|
||||
private ps!: PerfectScrollbar;
|
||||
|
||||
title = 'ShowZ';
|
||||
|
||||
ngAfterViewInit() {
|
||||
this.ps = new PerfectScrollbar(this.scrollContainer.nativeElement);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user