1
- < div class ="container_chatbot ">
2
- < div class ="app ">
3
- < div class ="head clearfix ">
4
- < span class ="messages-notification ">
5
- < i class ="fa fa-comments-o "> </ i >
6
- < span class ="count "> </ span >
7
- </ span >
8
- < span class ="title "> Chatroom</ span >
9
- < span class ="create-new ">
10
- < a (click) ="onClickFab() " class ="close ">
11
- < i class ="material-icons "> expand_more</ i >
12
- </ a >
13
- </ span >
14
- </ div >
15
-
16
- < div class ="body ">
17
- < div class ="friend-list clearfix ">
18
- < ul >
19
- < li class ="active ">
20
- < img src ="./../../../assets/angular.png " alt ="" />
21
- < span class ="name ">
22
- Angular 4
23
- </ span >
24
- </ li >
25
- </ ul >
1
+ < ng-template #fab [ngIf] ="visible == 'fab' ">
2
+ < div class ="menu pmd-floating-action " role ="navigation ">
3
+ < a (click) ="onClickChatbot() " class ="pmd-floating-action-btn btn btn-sm pmd-btn-fab pmd-btn-raised pmd-ripple-effect btn-default "
4
+ data-title ="CHat ">
5
+ < span class ="pmd-floating-hidden "> Chat</ span >
6
+ < i class ="material-icons "> question_answer</ i >
7
+ </ a >
8
+ < a class ="pmd-floating-action-btn btn pmd-btn-fab pmd-btn-raised pmd-ripple-effect btn-primary " data-title ="Chat ">
9
+ < span class ="pmd-floating-hidden "> Primary</ span >
10
+ < i class ="material-icons pmd-sm "> expand_less</ i >
11
+ </ a >
12
+ </ div >
13
+ </ ng-template >
14
+ < ng-template #chatroom [ngIf] ="visible == 'chatroom' ">
15
+ < div class ="container_chatbot ">
16
+ < div class ="app ">
17
+ < div class ="head clearfix ">
18
+ < span class ="messages-notification ">
19
+ < i class ="fa fa-comments-o "> </ i >
20
+ < span class ="count "> </ span >
21
+ </ span >
22
+ < span class ="title "> Chatroom</ span >
23
+ < span class ="create-new ">
24
+ < a (click) ="onClickFab() " class ="close ">
25
+ < i class ="material-icons "> expand_more</ i >
26
+ </ a >
27
+ </ span >
26
28
</ div >
27
- < div class ="chat-messages ">
28
- < div class ="chat ">
29
- < div #scrollMe [scrollTop] ="scrollMe.scrollHeight " class ="chat-content clearfix ">
30
- < div *ngFor ="let m of messages ">
31
- <!-- <div *ngIf="m.username=='you';then you else bot"></div> -->
32
- < ng-template #bot [ngIf] ="m.index == 'received' ">
33
- < span class ="friend last ">
34
- < div class ="username "> {{m.username}} :</ div >
35
- {{m.message}}
36
- </ span >
37
- </ ng-template >
38
- < ng-template #you [ngIf] ="m.index == 'sent' ">
39
- < span class ="you first ">
40
- {{m.message}}
41
- </ span >
42
- </ ng-template >
43
- < ng-template #notificaion [ngIf] ="m.index == 'user_joined' ">
44
- < span class ="connection ">
45
- < div > {{m.username}} joined </ div >
46
- < div > No. of participants in online : {{m.numUsers}}</ div >
47
- </ span >
48
- </ ng-template >
49
- < ng-template #notificaion [ngIf] ="m.index == 'user_left' ">
50
- < span class ="connection ">
51
- < div > {{m.username}} left </ div >
52
- < div > No. of participants in online : {{m.numUsers}}</ div >
53
- </ span >
54
- </ ng-template >
29
+
30
+ < div class ="body ">
31
+ < div class ="friend-list clearfix ">
32
+ < ul >
33
+ < li class ="active ">
34
+ < img src ="{{path}} " alt ="" />
35
+ < span class ="name ">
36
+ {{coursename}}
37
+ </ span >
38
+ </ li >
39
+ </ ul >
40
+ </ div >
41
+ < ng-template [ngIf] ="flag == 'chatroom' ">
42
+ < div class ="chat-messages ">
43
+ < div class ="chat ">
44
+ < div #scrollMe [scrollTop] ="scrollMe.scrollHeight " class ="chat-content clearfix ">
45
+
46
+ < div *ngFor ="let m of courses ">
47
+ < span style ="margin-left:10px;margin-top:10px;width:100% ">
48
+ < a (click) ="selectChatRoom(m.coursename,m.path) ">
49
+ < div class ="chip ">
50
+ < img src ="{{m.path}} " alt ="Person " width ="96 " height ="96 "> {{m.coursename}}
51
+ </ div >
52
+ </ a >
53
+ </ span >
54
+ </ div >
55
+ </ div >
55
56
</ div >
56
57
</ div >
57
- < div class ="msg-box ">
58
- < input #box (keyup.enter) ="onEnter() " type ="text " [(ngModel)] ="message " class ="ip-msg " placeholder ="type something.. " />
59
- < span class ="btn-group ">
60
- < a (click) ="onSendMessage() ">
61
- < i class ="material-icons "> send</ i >
62
- </ a >
63
- </ span >
58
+ </ ng-template >
59
+ < ng-template [ngIf] ="flag == 'chat' ">
60
+ < div class ="chat-messages ">
61
+ < div class ="chat ">
62
+ < div #scrollMe [scrollTop] ="scrollMe.scrollHeight " class ="chat-content clearfix ">
63
+ < div *ngFor ="let m of messages ">
64
+ <!-- <div *ngIf="m.username=='you';then you else bot"></div> -->
65
+ < ng-template #bot [ngIf] ="m.index == 'received' ">
66
+ < span class ="friend last ">
67
+ < span class ="username "> {{m.username}} :</ span > < span > {{m.message}}</ span >
68
+
69
+ </ span >
70
+ </ ng-template >
71
+ < ng-template #you [ngIf] ="m.index == 'sent' ">
72
+ < span class ="you first ">
73
+ {{m.message}}
74
+ </ span >
75
+ </ ng-template >
76
+ < ng-template #notificaion [ngIf] ="m.index == 'user_joined' ">
77
+ < span class ="connection ">
78
+ < div > {{m.username}} joined </ div >
79
+ < div > No. of participants in online : {{m.numUsers}}</ div >
80
+ </ span >
81
+ </ ng-template >
82
+ < ng-template #notificaion [ngIf] ="m.index == 'user_left' ">
83
+ < span class ="connection ">
84
+ < div > {{m.username}} left </ div >
85
+ < div > No. of participants in online : {{m.numUsers}}</ div >
86
+ </ span >
87
+ </ ng-template >
88
+ </ div >
89
+
90
+ </ div >
91
+ < div class ="msg-box ">
92
+ < input #box (keyup.enter) ="onEnter() " type ="text " [(ngModel)] ="message " class ="ip-msg " placeholder ="type something.. " />
93
+ < span class ="btn-group ">
94
+ < a (click) ="onSendMessage() ">
95
+ < i class ="material-icons "> send</ i >
96
+ </ a >
97
+ </ span >
98
+ </ div >
99
+ </ div >
64
100
</ div >
65
- </ div >
101
+ </ ng-template >
66
102
</ div >
67
103
</ div >
68
104
</ div >
69
- </ div >
105
+ </ ng-template >
0 commit comments