Using the Javascript Library within AngularJs App


I am hoping to using the Mattermost JavaScript API Library ( 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.