Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/arkaitzgarro/angular-salesforce

An Angular.js wrapper for Salesforce providing a simple and familiar API for Angular Developer.
https://github.com/arkaitzgarro/angular-salesforce

Last synced: about 1 month ago
JSON representation

An Angular.js wrapper for Salesforce providing a simple and familiar API for Angular Developer.

Awesome Lists containing this project

README

        

# angular-salesforce
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![npm version](https://badge.fury.io/js/angular-salesforce.svg)](https://badge.fury.io/js/angular-salesforce)

An Angular.js wrapper for Salesforce providing a simple and familiar API for Angular Developer.

#How do I add this to my project?
You can download `angular-salesforce` by:

* (prefered) Using npm and running `npm install angular-salesforce --save`
* Downloading it manually by clicking here to download development [(unminified)](https://cdn.rawgit.com/arkaitzgarro/angular-salesforce/master/angular-salesforce.js) [(minified)](https://cdn.rawgit.com/arkaitzgarro/angular-salesforce/master/angular-salesforce.min.js)

# Example
Here is a simple which allows you to include your own `deploymentId` and `organisationId` to test. Below is a quick start guide. Use either `$salesforce` or `Salesforce` service depending on your preference and opinions.

````html

angular.module('salesforceApp', [
'ngSalesforce'
])

// Configure your $salesforce module
.config(function($salesforceProvider) {
$salesforceProvider
.buttonId('uniqueId')
.onlineButtonId('liveagent_button_online_uniqueId')
.offlineButtonId('liveagent_button_offline_uniqueId')
.chatUrl('https://domain.salesforceliveagent.com/chat')
.deploymentId('deploymentId')
.organisationId('organisationId')
})
// init $salesforce
.run(function ($salesforce) {
$salesforce.init()
})
.controller('MainCtrl', function($scope, $salesforce) {
$scope.launchChat = function () {
$salesforce.startChatWithWindow('uniqueId')
}
});


Start chat
Service not available

````

# License
[MIT](https://github.com/arkaitzgarro/angular-salesforce/blob/master/LICENSE)