I'm working on a webpage developed with AngularJS and SASS, and depending on the browser url needs to change the stylesheet file.
Simplifying, I have two URL pointing to the same instance of the web, and depending on the URL, I need to load different stylesheet
- url_a.com -> stylesA.css
- url_b.com -> stylesB.css
In order to detect the url, i'm using Angulars $location service.
Local development works fine, but the deployed app, does not change styles.
Index.html:
<link rel="stylesheet" ng-href="styles/{{mainStylesSheet}}">
AppController
$rootScope.mainStylesSheet = ($location.host == 'urlA') ? main-a.css : main-b.css;
Appreciate your help. Thanks