Closed davidalisson closed 5 years ago
Hi @davidalisson ,
You can open a chat window from anywhere on your Angular application using the IChatController
interface. Please refer to the docs here https://github.com/rpaschoal/ng-chat#triggering-ng-chat-actions-from-elsewhere
Let me know if this helped you.
Cheers!
Hi, @rpaschoal. Thanks for responding. I tried with IChatController and it worked, but I need to hide the friendlist window, because the user can only open the chat by button.
Hi @davidalisson ,
If you want to hide the whole ng-chat component you could just add a *ngIf
to hide it based on your requirements, but I believe this might no be what you're after.
Do you want to use ng-chat only with the chat windows visible and have the friends list always hidden? If that is the case this will have to be implemented. There is a few viewport calculations that will have to be worked on but can be done and released in a patch or minor release.
Please let me know which one of the above you need for your application.
I tried using *ngIf
, but when I do this, I couldn't open the chat window from IChatController
The scenario is the following way: For each service I can have a different client, so I need the application to have a chat button for each service. The user can see the services that the clients requested and contact the client via chat if necessary.
I need only chat window to be visible and the friendlist be hidden, this it's possible in actually component version?
I see... the reason you can't open it via IChatController
using *ngIf
is because the whole component is not rendered which is clearly not what you want.
Having just the chat windows visible is not supported at the moment but I can release a patch version with this. I will see if I find a spare time during the weekend to implement it.
What is your timeline for having this feature available on your software? Cheers!
Very nice.. This is not a priority. I have other priorities to do. I'm gonna wait your feedback. Thanks for your support. Cheers!
Hi @davidalisson ,
I've just released version 1.1.1
with the changes included by this pull request #81
You can now use ng-chat without a friends list. To do so you have to disable the friends list by using the following input argument: [hideFriendsList]="false"
Let me know if this works for you. I'll close the issue if you're happy with the changes. Cheers!
Hi @davidalisson ,
What version of typescript are you using?
I'm using the latest version of typescript (3.1.6)
Thanks for pointing it out @davidalisson , I was using an older version of typescript... I will be updating a bunch of packages on this project to the latest versions and publish 1.1.2. Will let you know when this is done.
Meanwhile if you want to pass your build, just replace these:
setTimeout(this.onFetchMessageHistoryLoaded(result, window, direction, true));
setTimeout(this.onFetchMessageHistoryLoaded(result, window, ScrollDirection.Bottom));
with these
setTimeout(() => this.onFetchMessageHistoryLoaded(result, window, direction, true));
setTimeout(() => this.onFetchMessageHistoryLoaded(result, window, ScrollDirection.Bottom));
Hi, I am getting a 'Module build failed' error when I try to include the module in my project. I am attaching a screenshot of the error for your reference.
I have tried to include the file in tsconfig but it didn't work.
Version information - Angular CLI: 6.1.4 Node: 8.11.4 OS: darwin x64 Angular: 6.1.3
@angular-devkit/architect 0.7.4 @angular-devkit/build-angular 0.7.4 @angular-devkit/build-optimizer 0.7.4 @angular-devkit/build-webpack 0.7.4 @angular-devkit/core 0.7.4 @angular-devkit/schematics 0.7.4 @angular/animations 6.1.8 @angular/cdk 6.4.7 @angular/cli 6.1.4 @angular/material 6.4.7 @ngtools/webpack 6.1.4 @schematics/angular 0.7.4 @schematics/update 0.7.4 rxjs 6.3.3 typescript 2.7.2 webpack 4.9.2
Thanks in advance!
Hi @davidalisson and @surya0809 ,
Thank you for pointing out the issues. I've pushed a wrongly packaged distribution version as 1.1.1
. I've now deprecated it on NPM and pushed 1.1.2
which should include fixes for everything reported here.
I still have my PR open here as I have to upgrade the CLI for the tests, but I've managed to run it locally using the old CLI and they've all passed hence why I've already published it to NPM as 1.1.1 was broken. Will be fixing this during the weekend.
Please let me know if the issues have been sorted so I can close this thread. Cheers!
Works brilliantly. Thank you so much for the prompt response!!! 😁
I'm closing this as all requested changes and bugs have been implemented and fixed.
Hi, i need to open a chat window from a button, without friends bar, how can i do it? Friends bar needs to be not visible.
Chat button: https://ibb.co/fvtx6V