0

Is it possible to render a partial, based on the name of the route?

E.g., instead of doing this:

.when('/term/foo', {templateUrl: 'partials/term/foo.html'},
.when('/term/bar', {templateUrl: 'partials/term/bar.html}

to do something like this:

.when('/term/{{term}}', {templateUrl': 'partials/term/{{term}}.html'}

Where I am using the {{}} to show what I would like to happen.

If it's not clear, please let me know, I'll try to clarify.

Andriy Drozdyuk
  • 54,379
  • 48
  • 160
  • 267

0 Answers0