@ngxgs/style-manager
v0.0.4
Published
Provides a easy way to manage dynamically stylesheets
Downloads
4
Maintainers
Readme
Style Manager
Use this injectable class for easily add and remove stylesheets on your Angular application, managing these elements by they key.
Warning. This is a re-work of material.angular.io style-manager service, powered by the Renderer2 Angular API for Server-Side Rendering applications.
Getting Started
Install
Run the command: npm install @ngxgs/style-manager, inside your application.
Usage Exemple
import { Component, inject } from '@angular/core';
import { StyleManager } from 'ngx-style-manager';
@Component({
...
})
export class MyComponent {
styleManager = inject(StyleManager);
constructor() {
this.styleManager.setStyle('theme-class', 'path/to/style.css');
}
}Contact
Repository
You can contribute to this library through its GitHub repository: sougabriel/ngx-libraries.
