I have two CSS file generated, One for lighter Version and other for darker Version. So please let me know how can i maintain two theme for same App?
Any idea how c
Working plunker
You can easily toggle between CSS files.
index.html:
set your ng-app
on the HTML
tag:
dynamically set your style:
app.js: define your default style in run
:
$rootScope.style = "css/style.css";
controllers.js: add your toggle style logic:
//All available styles
$scope.styles = [
{
name: "Default",
url: "style.css"
},
{
name: "Dark",
url: "dark-style.css"
}
];
/**
* Change the style.
* @param style The selected style.
*/
$scope.changeStyle = function(style){
$rootScope.style = "css/" + style.url;
};
view.html: attach the related HTML
: