ui-router supports defining templates as subviews.
See views.
This supports components, inline templates and inline URLs in 2 flavors (as a config object and as a string):
.state('userlist', {
url: '/users',
views: {
body: {
controller: "bodyCtrl",
template: "<component-name></component-name>" // inline-template as a config object
},
header: {
controller: "headerCtrl",
templateUrl: "header.html" // templateUrl as a config object
},
'top@menu': {
component: "menuComponent" // component name as a config object
},
footer: "footerComponent" // component name as a string
}
}
It seems that to accomodate this, the route infrastructure would need to be refactored to understand multiple templates per route. I can make the PR but would like to get your input first since this would be an architectural change.