ghengeveld / angular-adaptive-templating

Adaptive templates for AngularJS
66 stars 10 forks source link

Is this ui-router compatible? #1

Open siddhion opened 9 years ago

siddhion commented 9 years ago

I am interested in using this with ui-router. Is it compatible out of the box?

gpstmp commented 9 years ago

Sorry for late response. The answer is YES. You just need to specify templateUrl accordingly like this:

app.config(['$stateProvider', function ($stateProvider) {
  $stateProvider
    .state('mainpage', {
      url: '/',
      templateUrl: '/templates/{mobile}{desktop}/index.html', // here is the main part
      controller: 'MainPageCtrl'
    });
  }]);
ghost commented 9 years ago

ok thanks :)