1

I have the following $router configuration

$router.config ([
      { path: '/account/profile', components: {'main' : 'accountProfile' }},
      { path: '/campaigns/:type', components: {'main' : 'campaigns' }},
      { path: '/login', components: {'main' : 'login' }},
      { path: '/', redirectTo: '/home' }
  ]);

and I want to change template for campaigns based on their :type.

How can I do this using the new Angular Router?

Alexandru R
  • 8,560
  • 16
  • 64
  • 98

1 Answers1

0

I think you could write your own TemplateMapping function - line 570 and return the templatename depending on the request params.

Michael
  • 3,085
  • 1
  • 17
  • 15