File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
docusaurus/docs/Angular/code-examples Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -73,3 +73,31 @@ jumpToMessage(message: StreamMessage) {
7373 {{ message.text }}
7474</div >
7575```
76+
77+ ## Unpin message
78+
79+ Let's extend our example and add an Unpin button to remove the pin from a message.
80+
81+ ``` typescript
82+ unpinMessage (message : StreamMessage < DefaultStreamChatGenerics > ) {
83+ this .channelService .unpinMessage (message );
84+ }
85+ ```
86+
87+ ``` html
88+ <div
89+ style =" padding : 8px ; background : #e1f5fe "
90+ *ngFor ="
91+ let message of channelService.activeChannelPinnedMessages$ | async
92+ "
93+ (click) =" jumpToMessage(message)"
94+ >
95+ {{ message.text }}
96+ <button
97+ style =" border : none ; background : none ; padding : 0 ; margin : 0 "
98+ (click) =" $event.stopPropagation(); unpinMessage(message)"
99+ >
100+ Unpin
101+ </button >
102+ </div >
103+ ```
You can’t perform that action at this time.
0 commit comments