How to use Strophe.js library in ionic for chat using xmpp

I want to create a chat module in ionic platform then i got example from here, but this solution looks older and its using ionic 1 , using $scope and and code is written in .js files which is including below mentioned files…

<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/routes.js"></script>
<script src="js/services.js"></script>
<script src="js/directives.js"></script>

In my application .ts files are used and different methods for controlling and routing and this code is using different methods. and i’m unable to find example of using strophe.js with ionic 2 and typescript code. can anyone help me? by giving example, link or steps of using strophe.js in ionic 2 such as how to make connection, how to get archived messages, manage presense, get contact list etc.