0

I recently implement this widget 'smooch' (http://docs.smooch.io/javascript/#welcome) to chat with the customer and help her in my website and is working great. But now I want to enable only in one view like a help tab. Any idea how can I do this?

The implementation I am using is the same as says in the docs of the widget. In my index.html I have this configuration:

<script src="https://cdn.smooch.io/smooch.min.js"></script>

<script>
    Smooch.init({appToken: 'my_app_token'});
</script>

This produce the chat is visible in every pages of the website.

1 Answers1

0

I found a simple a solution with this line in the javascript controller.

document.getElementById("sk-holder").style.visibility = "hidden";

And when I want to show it:

document.getElementById("sk-holder").style.visibility = "show";
  • Don't forget to use $timeout(function() {}) to call that scripts. It will prevents lags when your app grow up. – Joao Polo Feb 17 '16 at 14:32