Skip to content

Commit

Permalink
message
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvaro Ramirez Castillo authored and Alvaro Ramirez Castillo committed Feb 9, 2024
1 parent 9a3b548 commit a6778b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ <h1>{{message()}}</h1>

<input type="text" placeholder="offer" [formControl]="offerControl"/>

<input type="text" placeholder="message" [formControl]="messageControl"/>

<p>{{offerDesc}}</p>


5 changes: 2 additions & 3 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export class AppComponent {
private dc = inject(ChangeDetectorRef);

offerControl = new FormControl('');
messageControl = new FormControl('');
offerDesc = '';

message = signal('');
Expand Down Expand Up @@ -95,9 +96,7 @@ export class AppComponent {
}

sendData() {
const data = 'hello Moni';
this.sendChannel.send(data);
console.log('Sent Data: ' + data);
this.sendChannel.send(this.messageControl.value || '');
}

closeDataChannels() {
Expand Down

0 comments on commit a6778b3

Please sign in to comment.