My goal is to incorporate theme support into my single page application. The catch is that the theme change needs to be done locally through JavaScript without making any server calls, in order to work in offline mode. Since I am using angularjs, the HTML will be altered in the router.
The main issue I am facing is how to handle CSS. Is there a JavaScript library available to help me load CSS files? Are there potential complications that I should be aware of?
UPDATE: After some research, I came across the following library that may solve my problem of loading CSS files: https://github.com/rgrove/lazyload/. However, one drawback is that the library was last updated more than a year ago. I would prefer to find a more actively maintained library if possible.