UNPKG

angular-ai-chat-bot

Version:

Angular 6 AI Chat Bot module with Google Api

24 lines (18 loc) 538 B
import { Component } from '@angular/core'; import {Observable, Subject, from } from 'rxjs'; @Component({ 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) { } }