Adding Live Assist to the angularjs PhoneCat Tutorial App

This article show how to add Live Assist to the angularjs PhoneCat Tutorial App via a very simple button.
 
Follow the instructions in the tutorial here, https://docs.angularjs.org/tutorial, to install all required tools and angular-phonecat.
 
Once download run the development web server as described in the tutorial to test angular-phonecat.
 
1) Include the Live Assist consumer side web SDK
Reference the Live Assist web consumer side SDK:
 
Add the following to app/index.html
 
<script type='text/javascript' src='http://192.168.1.115:8080/assistserver/sdk/web/consumer/assist.js'></script>
 
NOTE: 192.168.1.115 should be replaced by your LA server's address
 
2) Add the button
Add the following to app/partials/phone-list.html
 
<button class="btn-lg btn-primary" ng-click="getAssist()">Ask For Help</button>
 
 
3) Add the button handler
Add the following to app/js/controllers.js
 
    $scope.getAssist = function() {
            console.log("starting support");
            AssistSDK.startSupport({destination : "agent1", url : "http://192.168.1.115:8080"});
    };
 
Note that:
  • 'agent1' assumes you are using the sample agent console shipped with live assist - adjust to fit your test environment
  • you will need to change the IP address above to be that of your installed Live Assist instance.
 
4) Run the app
As per the instructions here https://docs.angularjs.org/tutorial
  • npm start
  • type the following url into your browser
    • http://localhost:8000/app/index.html
 
 
 
 
 
 

 

Comments are disabled on these articles if you require help contact support@cafex.com.

Have more questions? Submit a request

Comments

Powered by Zendesk