# Change SASS variable dynamically

**URL:** <https://forum.ionicframework.com/t/change-sass-variable-dynamically/31792>\
**Category:** ionic-v1\
**Created:** [September 4, 2015, 9:26pm UTC](https://forum.ionicframework.com/t/change-sass-variable-dynamically/31792 "2015-09-04T21:26:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zavataafnan](https://avatars.discourse-cdn.com/v4/letter/z/13edae/32.png) [@zavataafnan](https://forum.ionicframework.com/u/zavataafnan)\
**Post date:** [September 4, 2015, 9:26pm UTC](https://forum.ionicframework.com/t/change-sass-variable-dynamically/31792/1 "2015-09-04T21:26:26Z")

</div>

Hi,  
Is there any way to change SASS variable dynamically?  
For example, I have a variable as follow:

```
$lang: fa !default;

```

I want to change it at run-time to ‘en’. As i search the ionic forum, I can not find any good hint.  
Is there anyway to change this variable dynamically?

Best Regards,  
Mostafa

---

<div class="post-metadata">

**Author:** ![gmarziou](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gmarziou/32/13327_2.png) [@gmarziou](https://forum.ionicframework.com/u/gmarziou)\
**Post date:** [September 5, 2015, 9:21am UTC](https://forum.ionicframework.com/t/change-sass-variable-dynamically/31792/2 "2015-09-05T09:21:02Z")

</div>

SASS is compiled into CSS so there’s no way you can change dynamically the content of a variable because CSS don’t have variables.

A solution is to use angular to change an existing class using ng-class or ng-style.

> <https://stackoverflow.com/questions/18918458/dynamically-change-a-css-class-properties-with-angularjs>
