更新时间:2022-08-28 19:29:31
ssue 里提到的 UserAccountService:
实现了 UserAccountFacade.
如果直接导入 UserAccountService:
import { UserAccountService } from ‘@spartacus/user/account/core’;报错:解决方案:
import { UserAccountFacade } from ‘@spartacus/user/account/root’
The actual services are lazily loaded, so that only when you use it, the additional js will be loaded. This requires however that you inject the facade instead, so that we can do the magic of loading the service lazily.
需要注入 facade,让 facade 执行延迟加载。