Angular dependency with “providedIn” in lazy loading modules
问题 I am using Angular "Lazy-loading feature modules" as an example: live demo CustomersModule is a lazy loading module i create a test service in customer module. const routes: Routes = [ { path: 'customers', loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule) }, { path: 'orders', loadChildren: () => import('./orders/orders.module').then(m => m.OrdersModule) }, { path: '', redirectTo: '', pathMatch: 'full' } ]; import { Injectable } from '@angular/core';