Is it feasible to utilize ng-view without a need for a routeProvider, such as by directly including the routes in the markup section (I understand that mixing logic with view is not ideal, but perhaps acceptable in this scenario, since it's essentially a conditional template). My route provider currently has fixed templates linked to Angular directives:
spaceJam.config(function($routeProvider, $locationProvider) {
$routeProvider.
when('/images', {
template: '<ng-my-image-editor></ng-my-image-editor>'
}).
when('/videos', {
template: '<ng-my-video-editor></ng-my-video-editor>'
}).
when('/calendar', {
template: '<ng-my-calendar-editor></ng-my-calendar-editor>'
}).
otherwise({redirectTo: '/images'}) ;
$locationProvider.html5Mode(false);
});
would it be possible to have something like the following instead:
<ng-view>
<ng-view-selection when="/images" default><ng-my-image-editor></ng-my-image-editor></ng-view-selection>
<ng-view-selection when="/videos"><ng-my-video-editor></ng-my-video-editor></ng-view-selection>
<ng-view-selection when="/calendar"><ng-my-calendar-editor></ng-my-calendar-editor></ng-view-selection>
<ng-view>
Are there any alternative approaches for achieving this?