Comments (6)
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 thengOnDestroy
to be called which destroys current widget instance. - Setting it to
true
value would cause thengOnInit
to be called which initialize new widget instance.
from chat-widget-adapters.
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.
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.
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.
@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.
@walaszczykm please help me to proceed further.
from chat-widget-adapters.
Related Issues (20)
- Optimize external scripts HOT 2
- Color Change on react js HOT 1
- Question: How to use with Custom Identity Provider? HOT 2
- Set LiveChat Customer Avatar HOT 1
- Angular v15 update HOT 4
- Angular v15 update HOT 2
- Add SvelteKit Support HOT 1
- Intermittent white bar on bottom on mobile devices HOT 1
- Angular Adaptor Event Handlers
- uniapp require is not defined.
- hook to open the chat from a button or event
- Update window types
- Support Angular 16 HOT 1
- Programmatically start chat HOT 2
- asyncInit incorportation
- visibility="minimized" do hide chat icon in mobile view. HOT 1
- Cannot read properties of null (reading 'useRef')
- Hooks for interacting with the widget
- How to get baseAPI when use customIdentityProvider
- Minimised hides the vue chat widget, if the support is offline. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-widget-adapters.