angular-ai-chat-bot
Version:
Angular 6 AI Chat Bot module with Google Api
24 lines (18 loc) • 538 B
text/typescript
import { Component } from '@angular/core';
import {Observable, Subject, from } from 'rxjs';
({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
public msg: Subject<any> = new Subject();
public msgArray: Observable<Array<any>> = new Observable<Array<any>>();
constructor() {
}
public onChange(target: any) {
this.msg.next(target.value);
target.value = '';
}
public onMsgReceive(msg: string) { }
}