Skip to content

Commit

Permalink
New feature buttons added in the chat version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MuraliChandran committed May 1, 2020
1 parent 6389eaa commit bfa8fe5
Show file tree
Hide file tree
Showing 8 changed files with 394 additions and 315 deletions.
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.1",
"@angular/animations": "^9.1.2",
"@angular/cdk": "^9.2.1",
"@angular/common": "~9.1.1",
"@angular/compiler": "~9.1.1",
"@angular/core": "~9.1.1",
"@angular/forms": "~9.1.1",
"@angular/material": "^9.2.1",
"@angular/platform-browser": "~9.1.1",
"@angular/platform-browser-dynamic": "~9.1.1",
"@angular/router": "~9.1.1",
Expand Down
2 changes: 2 additions & 0 deletions src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


:host {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 14px;
Expand Down
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ChatWidgetComponent } from './chat/chat-widget/chat-widget.component';
import { ChatInputComponent } from './chat/chat-input/chat-input.component';
import { ChatAvatarComponent } from './chat/chat-avatar/chat-avatar.component';
import { HttpClientModule } from '@angular/common/http';
import { MatButtonModule } from '@angular/material/button';

@NgModule({
declarations: [
Expand All @@ -19,7 +20,8 @@ import { HttpClientModule } from '@angular/common/http';
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule
HttpClientModule,
MatButtonModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
11 changes: 7 additions & 4 deletions src/app/chat/chat-services/chat-services.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@ export class ChatServicesService {
constructor(private httpClient: HttpClient) {}

url: string = 'http://localhost:5005/webhooks/rest/webhook';

data;
botMessageRequest(m: any): Observable<any> {
const data = JSON.stringify({


this.data = JSON.stringify({
sender: 'User',
message: m,
});

return this.httpClient.post<any>(this.url, data, httpOptions).pipe(

console.log("Data", this.data);
return this.httpClient.post<any>(this.url, this.data, httpOptions).pipe(
map((res) => {
console.log('service', res);
return JSON.stringify(res);
Expand Down
Loading

0 comments on commit bfa8fe5

Please sign in to comment.