resolver on lazy loading angular
Angular docs on lazy loading
This config always works for me. If this doesnt work there may be something wrong with your resolver.
const routes: Routes = [
{
path: 'second',
loadChildren: () => import('/second/second.module')
.then(m => m.SecondModule),
resolve: {
data: SecondResolverService
}
},