我的angular 8应用程序在Chrome和IE11上均正常运行。但是,现在我添加了聊天机器人代码,并在Dialogflow lib的帮助下与[email protected]进行通信之后,它尚未在IE11上加载。它在chrome上工作正常。另外,我在IE的控制台上看不到任何错误。
我关注了几乎所有类似主题上的可用链接,并体验到甚至Github上可用的示例也具有类似的行为。如果您在chrome上打开this,则无法使用,但在IE11中无法使用。同样,this github示例在Chrome上可以正常运行,但在IE11上却不能。
如果有人可以指导我,那将有很大的帮助。这样聊天机器人代码也可以在IE11上开始工作。
如果需要答案,我愿意公开任何代码。这是我的聊天服务课程。
import { ApiAiClient } from 'api-ai-javascript/es6/ApiAiClient';
....
export class ChatService {
....
readonly client = new ApiAiClient({ accessToken: this.token });
....
public converse(msg: string) {
const userMessage = new Msg(msg, 'user');
this.update(userMessage);
return this.client.textRequest(msg)
.then(res => {
const speech = res.result.fulfillment.speech;
const botMessage = new Msg(speech, 'bot');
this.update(botMessage);
});
}
....