ng-theme-system
v0.0.3
Published
## Overview
Downloads
35
Maintainers
Readme
NgThemeSystem
Overview
A simple Angular service which return the user system theme( use ng-theme-system)
Démo
Installation
npm i ng-theme-system
import { NgThemeSystemService } from "ng-theme-system";
imports: [NgThemeSystemService];
Usage
import { NgThemeSystemService } from 'ng-theme-system';
constructor(private themeSystemService: NgThemeSystemService) {
console.log('isDarkTheme', this.themeSystemService.isDarkTheme());
console.log('isLightTheme', this.themeSystemService.isLightTheme());
console.log('currentTheem', this.themeSystemService.getSytemTheme());
this.themeSystemService.listenSystemTheme().subscribe((theme) => {
console.log('themeChangeListener', theme);
});
}