How can i get value from component.ts file to .scss file in ionic 3.I havve requirement to change the splash screen and logo and color as per given in database.Please help how could do this.
You can’t do it directly to the SCSS file, that’s a preprocessor file so it doesn’t exist in the app by the time the database is being read - its already CSS.
You would need to override the CSS rules by some method, for example, one of these:
- outputting a
<style>block into the page that has rules which override your existing ones to add your own colours in.
- prebaking the css files, one for each colour (if you have a limited number of options) and just including whichever theme file you want at run-time
To be a bit more clear with specific examples, I think you should be looking on google for “ionic themeswitcher”:
Thanks a lot for reply back.
thank you for your reply