Hey,

i got a usecase where i want to keep the template from another state but 
change the controller, to controll it. The point is, the template is a 
canvans and should not be regenerate. Here is a part of my current code:

$stateProvider.state('map', {
  url: '/map',
  views: {
    'content': {
      templateUrl: 'views/mapview.html',
      controller: 'DefaultMapController',
      resolve: {
        ads: function (MultiAdsLoader) {
          return MultiAdsLoader();
        }
      }
    }
  }
});

$stateProvider.state('show', {
  url: '/show/:id',
  views: {
    'content': {
      templateUrl: 'views/mapview.html',
      controller: 'ANOTHERCONTROLLER'
    },
    'dialog': {
      templateUrl: 'views/showDialog.html',
      controller: 'ShowAdDialogController',
      resolve: {
        ad: function (AdLoader, $stateParams) {
          return AdLoader($stateParams.id);
        }
      }
    }
  }
});


What do you think?! With this solution, the map gets rerendert for every 
statechange.

Best regards,
Max

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" 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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to