Error: src/app/app.service.ts:20:11 - error TS7053: Element implicitly has an 'any' type because expression of type '"name"' can't be used to index type 'Object'.
Property 'name' does not exist on type 'Object'.
20 if (response['name']) {
~~~~~~~~~~~~~~~~

遇到上面的错误我们只需要将reponse的类型设置为any就可以了
authenticate(credentials: {
username: string; password: string;

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



