Refactor appConfig component, update layoutService and implement Angular signals
This commit is contained in:
@@ -43,7 +43,7 @@ Run 'ng help' for more options.</code></pre>
|
||||
|
||||
<pre class="app-code"><code>import { Component, OnInit } from '@angular/core';
|
||||
import { PrimeNGConfig } from 'primeng/api';
|
||||
import { LayoutService } from './layout/service/app.layout.service';
|
||||
import { LayoutService, AppConfig } from './layout/service/app.layout.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -57,7 +57,7 @@ export class AppComponent implements OnInit {
|
||||
this.primengConfig.ripple = true; //enables core ripple functionality
|
||||
|
||||
//optional configuration with the default configuration
|
||||
this.layoutService.config = {
|
||||
const config: AppConfig = {
|
||||
ripple: false, //toggles ripple on and off
|
||||
inputStyle: 'outlined', //default style for input elements
|
||||
menuMode: 'static', //layout mode of the menu, valid values are "static" and "overlay"
|
||||
@@ -65,6 +65,7 @@ export class AppComponent implements OnInit {
|
||||
theme: 'lara-light-indigo', //default component theme for PrimeNG
|
||||
scale: 14 //size of the body font size to scale the whole application
|
||||
};
|
||||
this.layoutService.config.set(config);
|
||||
}
|
||||
|
||||
}</code></pre>
|
||||
|
||||
Reference in New Issue
Block a user