SAP Spartacus B2BUserService的一个问题
This issue is for discussion in this StackOverflow question:https://stackoverflow.com/questions/66458798/how-can-i-detect-current-users-user-group-in-spartacus
In order to test it, I add the following source code in AppModule’s constructor:
constructor(b2b: B2BUserService){
const result = b2b.getUserGroups('ab3f7a08-690a-4616-b1fe-4f0847fcb79f', {
pageSize: 100
});
result.subscribe((data) => console.log('Ethan: ' , data));
}
I expect the user group data is printed.
Unfortunately I meet with this error message:
ERROR TypeError: Cannot read property ‘b2bUser’ of undefined
callstack:
Do I need to call some other method to “initialize” the state before I access it?
更多Jerry的原创文章,尽在:“汪子熙”:
post SAP-Garson
原文链接:https://blog.csdn.net/i042416/article/details/114376800文章来自于网络,如果侵犯了您的权益,请联系站长删除!