我正在尝试在服务中模拟如下功能:
.mock(WelcomeScreenService, { loadUserPreferences: of(mockRes) })
完整代码:
我的回复(API)
{"overviewPreferences":{"selectedRole":
[{"code":"Practitioner","name":"ADMIN"}],"selectedDomainList":
[{"code":"14L","name":"Recruitment"},{"code":"5L","name":"Time"}]}};
我的界面,
export interface UserDomainList {
overviewPreferences: UserDomainsList;
}
export interface UserDomainsList {
selectedDomainList: Code[];
selectedRole: Code[];
aoId?: string;
}
export interface Code {
code: string;
name: string;
}
出现标题中的错误。