1- < h2 > SignalR chat example </ h2 >
1+ < h2 > WebSockets ( SignalR) Chatroom Example </ h2 >
22
3- < div class ="row ">
4- < div class ="col-md-12 ">
5- < div class ="panel panel-primary ">
6- < div class ="panel-heading ">
7- < span class ="glyphicon glyphicon-comment "> </ span > Chat
8- </ div >
9- < div class ="panel-body ">
10- < ul class ="chat ">
3+ < blockquote >
4+ Data is stored in Azure here - so even in localhost you might be chatting with other people!
5+ </ blockquote >
116
12- < li class ="left clearfix " *ngFor ="let message of chatMessages ">
13- <!--<span chatMessage="chat-img pull-left">
14- <img src="http://placehold.it/50/55C1E7/fff&text=U" alt="User Avatar" class="img-circle" />
15- </span>-->
7+ < div class ="row ">
8+ < div class ="col-md-12 ">
9+ < div class ="panel panel-primary ">
10+ < div class ="panel-heading ">
11+ < span class ="glyphicon glyphicon-comment "> </ span > Angular Chat
12+ </ div >
13+ < div class ="panel-body ">
14+ < ul class ="chat ">
1615
17- < div class ="chat-body clearfix ">
18- < div class ="header ">
19- < strong class ="primary-font "> {{message.user}}</ strong >
20- < small class ="pull-right text-muted "> < span class ="glyphicon glyphicon-time "> </ span > x mins ago</ small >
21- </ div >
22- < p >
23- {{message.content}}
24- </ p >
25- </ div >
26- </ li >
16+ < li class ="left clearfix " *ngFor ="let message of chatMessages ">
17+ < span chatMessage ="chat-img pull-left ">
18+ < img src ="http://placehold.it/50/55C1E7/fff&text=U " alt ="User Avatar " class ="img-circle " />
19+ </ span >
2720
28- </ ul >
21+ < div class ="chat-body clearfix ">
22+ < div class ="header ">
23+ < strong class ="primary-font "> {{message.user}}</ strong >
24+ < small class ="pull-right text-muted "> < span class ="glyphicon glyphicon-time "> </ span > x mins ago</ small >
25+ </ div >
26+ < p >
27+ {{ message.content }}
28+ </ p >
2929 </ div >
30- < div class ="panel-footer ">
31- < div class ="input-group ">
32- < span class ="input-group-btn " style ="padding-right: 10px; min-width: 150px; ">
33- < input #username id ="btn-input " type ="text " class ="form-control input-sm " value ="Neo " />
34- </ span >
35- < input #message id ="btn-input " type ="text " class ="form-control input-sm " placeholder ="Type your message here... " />
36- < span class ="input-group-btn ">
37- < button class ="btn btn-warning btn-sm " id ="btn-chat " (click) ="sendMessage(username.value, message.value) "> Send</ button >
38- </ span >
39- </ div >
40- </ div >
41- </ div >
30+ </ li >
31+
32+ </ ul >
33+ </ div >
34+ < div class ="panel-footer ">
35+ < form >
36+ < div class ="input-group ">
37+ < span class ="input-group-btn " style ="padding-right: 10px; min-width: 150px; ">
38+ < input #username id ="btn-input " type ="text " class ="form-control input-sm " value ="Neo " />
39+ </ span >
40+ < input #messageInput id ="btn-input " type ="text " class ="form-control input-sm " placeholder ="Type your message here... " />
41+ < span class ="input-group-btn ">
42+ < button class ="btn btn-warning btn-sm " id ="btn-chat " (click) ="sendMessage(username.value, messageInput) "> Send</ button >
43+ </ span >
44+ </ div >
45+ </ form >
46+ </ div >
4247 </ div >
48+ </ div >
4349</ div >
4450
45- < pre > {{chatMessages | json}}</ pre >
51+ < pre > {{ chatMessages | json }}</ pre >
0 commit comments