Can anyone please suggest whats the best way to send data to the routed view using angular-route module.
I have tried using resolve block but there are like 500 route configuration in my project and since similar kind of data needs to be passed, it would be better if we can have some common resolve block or some other logic by which we can pass the data to the routed view instead of modifying 500 routes and add the same logic repeatedly.
I tried passing value in resolve block but this will mean modifying the route configuration for all 500 routes
// route configuration for adding resolve block
$routeProvider.when('/classes/:classId', {
controller: 'ClassCtrl',
templateUrl: TEMPLATE_CACHE + '/classByStudent.html',
reloadOnSearch: false,
resolve: {
data: 'some_value'
}
})