,
declarations: [VehicleFaultComponent, ListComponent, DetailComponent, CleanComponent], // 声明组件...VehicleFaultService}] // 这是一种别名的写法
})
export class VehicleFaultModule { }复制代码
// 引入一些生命周期的控制,组件值传递响应接口等...ActivatedRoute
) {
super(router, activatedRoute);
}
ngOnInit() {
}
}
// 若是要使用别名注入,还需要引入Inject,从core...复制代码
单一components内注入,自己使用
组件内用providers引入
// 服务
import { vehicleFaultService } from '.....fadeIn],
providers: [vehicleFaultService, EventsService]
})复制代码
----
总结
服务若是结合@Inpu(),@Output()..感觉不需要ngrx