答案 0 :(得分:2)
您可以将app1模块导入app2
+----+--------------------------+---------+
| id | range | days |
+----+--------------------------+---------+
| 1 | 2017-02-14 to 2017-03-02 | 16 days |
| 2 | 2017-03-02 to 2017-03-23 | 21 days |
| 3 | 2017-03-23 to 2017-05-10 | 48 days |
| 4 | 2017-05-10 to 2017-05-24 | 14 days |
+----+--------------------------+---------+
或者您可以直接导入服务类,以便将app1的服务(app1Service)导入app 2 ....
import { app1Module} from '../app1/app1.module';
@NgModule({
declarations: [..., ...],
imports: [app1],
bootstrap: [...],
providers: [...]
})