I want to add this import
<link rel="stylesheet" href="./assets/sass/style.scss">
<link rel="stylesheet" href="./assets/sass/plugins.scss">
by condition to index.html in angular
but it's not work
I want to change style to rtl or ltr by selected language so i change import scss file in index.html
style rtl is
<link rel="stylesheet" href="./assets/sass/style.angular.scss">
<link rel="stylesheet" href="./assets/css/style.rtl.css">
style ltr is
<link rel="stylesheet" href="./assets/sass/style.scss">
<link rel="stylesheet" href="./assets/sass/plugins.scss">
Lets assume the contents of
style.angular.scssLets assume the contents of
style.scssmodify it so that there is a parent class wrapping each of the different styles so the new code will be
style.angular.scssstyle.scssNow you can import all imports and styles can be applied based on the parent class (either
body-ltr-classorbody-rtl-class)For adding class to the body tag, please use the below stack overflow answer
add class to body tag