Prestige no lee primero las configuraciones del tema del componente

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
wilfred9099
Posts: 10
Joined: 09 Mar 2018, 05:29

02 Jun 2021, 20:03

Buen día

Tengo una consulta dado que yo tengo una plantilla prestige que quiero guardar la configuración del tema en BD por usuario, pero en el componente app.component.ts esta donde se parametriza que tema esta por defecto al cargar el proyecto pero al hacer el cambio no se ve efectos

Revisando el proyecto encontré que en el index.html se hace referencia a ese tema y layout

<head>
<meta charset="utf-8">
<title>TCL</title>
<base href="/">

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link id="theme-css" rel="stylesheet" type="text/css" href="assets/theme/theme-cyan.css">
<link id="layout-css" rel="stylesheet" type="text/css" href="assets/layout/css/layout-aqua.css">
</head>

Pero yo no quiero que cargue con esos sino con los que se definan en el app.component.ts que al final es el fin del componente

export class AppComponent implements OnInit{
theme = 'indigo';

layout = 'layout-canvas';

layoutMode = 'horizontal';

wrapperMode = false;

inputStyle = 'outlined';

ripple: boolean;

constructor(private primengConfig: PrimeNGConfig) { }

ngOnInit() {
this.primengConfig.ripple = true;
this.ripple = true;
}
}

Quedo a la espera de sus comentarios

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

04 Jun 2021, 13:29

Hi,
Firstly, your theme and layout choice must be the same in index.html and app.component.ts files. Also, you can change the theme and layout using one of them. We use variables in app.component.ts file for the live demo. You can use only index.html definitions.

wilfred9099
Posts: 10
Joined: 09 Mar 2018, 05:29

16 Aug 2021, 08:28

Muchas gracias por tus comenarios

Al final lo resolvi de otra manera, pero agradezco el apoyo

Saludos

merve7
Posts: 861
Joined: 12 Sep 2017, 10:44

19 Aug 2021, 14:12

Hi,

Glad to hear that :)


Best regards,
Merve Özçifçi

Post Reply

Return to “Prestige - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest