I would like to make a select button in Home.tpl.html page to call 
ConfigureTheme function in app.Config. Here are my source code.



Home.tpl.html

<form>
   <div class="form-group" >
      <label>Theme</label>
      <select class="form-control"  ng-model="themeCtrl" 
ng-change="vm.changeTheme()" ng-options="layout.name for layout in layouts">
      </select>
   </div>
   <label>{{themeCtrl.name}}</label>
</form>


app.config.js

function configureTheme() {
    var theme = 'indigo';
    if (theme === 'blueGray') {
        blueGrayTheme();
    } else {
        indigoTheme();
    }

  $mdThemingProvider.setDefaultTheme('default');
  //  $mdThemingProvider.alwaysWatchTheme(true);
}


I am not sure on how to call a functions in config file using angular way. 
Can someone help me out pls?


















-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to