loading...

re: Create A Dark/Light Mode Switch with CSS Variables VIEW POST

FULL DISCUSSION
 

I keep trying to serve it via ng serve but instead i get the error "Property 'checked' does not exist on type 'Element" referring to "if (currentTheme) {
document.documentElement.setAttribute('data-theme', currentTheme);

if (currentTheme === 'dark') {
    toggleSwitch.checked = true;
}

}"

Code of Conduct Report abuse