0

I am currently working on an application which may have a different theme depending on the client, previously this functionality was made with akylas-teme.

but I migrated the project to angular 11 and nativescript 7 so this solution no longer works for me.

How could I carry out the same functionality that I had previously? With dynamic themes for each client.

I will provide more information about my project if it is necessary to carry out the solution, thank you very much

Sbenitez73
  • 13
  • 3

1 Answers1

0

add a root class to your page/s

xml/html:

<Page class="blue-theme">...

js:

changeTheme () {
    page.className = 'red-theme';
}

scss:

@import "~@nativescript/theme/core";
@import "~@nativescript/theme/default";
.blue-theme {
    @import "~@nativescript/theme/blue";
}
wendt88
  • 544
  • 5
  • 22