Git Product home page Git Product logo

Comments (6)

walaszczykm avatar walaszczykm commented on July 29, 2024

Hello @Saqib92 👋

If you would like to hide the Chat Widget on particular pages you can use visibility="hidden" component property. Later if you would like to show it again, change the value to visibility="minimized" for example. You can read about all available component properties here: #config-data.

In case you would like to destroy the widget completely, just use *ngIf on the <livechat-widget> element.

  • Setting it to false value would cause the ngOnDestroy to be called which destroys current widget instance.
  • Setting it to true value would cause the ngOnInit to be called which initialize new widget instance.

from chat-widget-adapters.

Saqib92 avatar Saqib92 commented on July 29, 2024

dynamic visibility="hidden" is not working.
I tried Ionic Life cycle hook:

page.ts

myVisibilityVariable: string = 'minimized'; // by default;

ionViewDidEnter(){ // WillEnter workd when page loads. 
    this.myVisibilityVariable = 'minimized';
}

ionViewDidLeave(){. // didLeave works when page changed.
    this.myVisibilityVariable = 'hidden'; // not working
}

page.html


[visibility]="myVisibilityVariable" // not working

visibility="{{myVisibilityVariable}}" // not working 

from chat-widget-adapters.

RanganadhCreditcorp avatar RanganadhCreditcorp commented on July 29, 2024

Hi @Saqib92, I have tried it the same way, it is maximizing/minimizing/hiding the widget fine for me now.
I have added livechat-widget in app.component.html, so it is working as the model defined in app.component.ts.

But I am looking to find the solution to hide/maximize/minimize the widget from other component like Login.component/AccountDetails.component.

Do you have any solution for the same, much like we do in js as below, I need to implement in angular, please help me out.

LiveChatWidget.get(‘chat_data’)
LiveChatWidget.call(‘set_customer_name’, ‘Test’)
LiveChatWidget.call(‘set_customer_email’, ‘[email protected]’)
LiveChatWidget.call(‘maximize’)
LiveChatWidget.call(‘minimize’)
LiveChatWidget.call(‘hide’)

Please note that, LiveChatWidget is globally accessible in js, I should be able to do these where ever is required across the application in Angular.

@walaszczykm please help me to proceed further.

from chat-widget-adapters.

Saqib92 avatar Saqib92 commented on July 29, 2024

Hi @Saqib92, I have tried it the same way, it is maximizing/minimizing/hiding the widget fine for me now. I have added livechat-widget in app.component.html, so it is working as the model defined in app.component.ts.

But I am looking to find the solution to hide/maximize/minimize the widget from other component like Login.component/AccountDetails.component.

Do you have any solution for the same, much like we do in js as below, I need to implement in angular, please help me out.

LiveChatWidget.get(‘chat_data’) LiveChatWidget.call(‘set_customer_name’, ‘Test’) LiveChatWidget.call(‘set_customer_email’, ‘[email protected]’) LiveChatWidget.call(‘maximize’) LiveChatWidget.call(‘minimize’) LiveChatWidget.call(‘hide’)

Please note that, LiveChatWidget is globally accessible in js, I should be able to do these where ever is required across the application in Angular.

@walaszczykm please help me to proceed further.

you can do something like this: #40 (comment)
with the help you SubjectBehaviour Service.

from chat-widget-adapters.

RanganadhCreditcorp avatar RanganadhCreditcorp commented on July 29, 2024

@Saqib92 Thanks for the prompt reply, I have tried the BehaviourService too in other components.
I tried updating the properties using WidgetState, but the property values are not updating at the widget side.
I am not sure, may be these WidgetStateSubject, WidgetStateService are meant for read-only.

from chat-widget-adapters.

RanganadhCreditcorp avatar RanganadhCreditcorp commented on July 29, 2024

@walaszczykm please help me to proceed further.

from chat-widget-adapters.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.