# Using the Javascript Library within AngularJs App

**URL:** <https://forum.mattermost.com/t/using-the-javascript-library-within-angularjs-app/2380>\
**Category:** Troubleshooting\
**Created:** [October 17, 2016, 8:45pm UTC](https://forum.mattermost.com/t/using-the-javascript-library-within-angularjs-app/2380 "2016-10-17T20:45:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keithg](https://avatars.discourse-cdn.com/v4/letter/k/7feea3/32.png) [@keithg](https://forum.mattermost.com/u/keithg)\
**Post date:** [October 17, 2016, 8:45pm UTC](https://forum.mattermost.com/t/using-the-javascript-library-within-angularjs-app/2380/1 "2016-10-17T20:45:48Z")

</div>

Hello

I am hoping to using the Mattermost JavaScript API Library ([GitHub - mattermost/mattermost-driver-javascript: Javascript library for interacting with the Mattermost API](https://github.com/mattermost/mattermost-driver-javascript)) within an AngularJs app I am working on however I am unsure how to instantiate the connection using the library. I have used a pure http call and can make connection to the Mattermost server I am running but would obviously prefer to use the library.

I can not use :var Mattermost = require(‘mattermost’);  
var client = new Mattermost.Client(); since this is angular …

Can someone make a quick suggestion or perhaps point me at an example out there to get an idea how this can be done?

Thank you.

KG
