angularjs - IONIC: Changing colors dynamically on sidemenu demo -
i'm writing ionic framework "sidemenu" type of app (based on sidemenu demo/starter) allows user choose theme (basically, bars , buttons colors). problem when user clicks button change dynamically theme, changes color of menu's header , not color of views header (stays in first color of array). here codepen example (just click on "change color" button on side menu): http://codepen.io/anon/pen/oxqqqm note: variable $scope.temabar starts "ionic color positive" ( $scope.temabar = 'positive'; ) , changed when button "change color" clicked. can tell me i'm doing wrong? thanks well code pen not work can't tell wrong if want change classes dynamically use ng-class directive. simple, easy, fast, , works. if using ng-class please fix codepen , update answer :d https://docs.angularjs.org/api/ng/directive/ngclass and example: http://codepen.io/sevilayha/pen/onfrd html: <div class="container...