mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-07 01:58:50 +01:00
Implement ripple effect for material themes
This commit is contained in:
parent
c7bcbca7bd
commit
2f7d61ded1
12 changed files with 334 additions and 15 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MAT_RIPPLE_GLOBAL_OPTIONS } from '@angular/material/core';
|
||||
import { NbAuthModule, NbDummyAuthStrategy } from '@nebular/auth';
|
||||
import { NbSecurityModule, NbRoleProvider } from '@nebular/security';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
|
|
@ -51,6 +52,7 @@ import { CountryOrderService } from './mock/country-order.service';
|
|||
import { StatsProgressBarService } from './mock/stats-progress-bar.service';
|
||||
import { VisitorsAnalyticsService } from './mock/visitors-analytics.service';
|
||||
import { SecurityCamerasService } from './mock/security-cameras.service';
|
||||
import { RippleService } from './utils/ripple.service';
|
||||
import { MockDataModule } from './mock/mock-data.module';
|
||||
|
||||
const socialLinks = [
|
||||
|
|
@ -91,6 +93,7 @@ const DATA_SERVICES = [
|
|||
{ provide: StatsProgressBarData, useClass: StatsProgressBarService },
|
||||
{ provide: VisitorsAnalyticsData, useClass: VisitorsAnalyticsService },
|
||||
{ provide: SecurityCamerasData, useClass: SecurityCamerasService },
|
||||
{provide: MAT_RIPPLE_GLOBAL_OPTIONS, useExisting: RippleService},
|
||||
];
|
||||
|
||||
export class NbSimpleRoleProvider extends NbRoleProvider {
|
||||
|
|
|
|||
11
src/app/@core/utils/ripple.service.ts
Normal file
11
src/app/@core/utils/ripple.service.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { RippleGlobalOptions } from '@angular/material/core';
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class RippleService implements RippleGlobalOptions {
|
||||
public disabled: boolean = false;
|
||||
|
||||
public toggle(enabled: boolean): void {
|
||||
this.disabled = !enabled;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue