angular-cloud-elements
An AngularJS Library for interacting with the Cloud Elements Platform APIs
Features
ceElements
for interacting with Elements and Element Instances APIsceFormulas
for interacting with Formulas and Formula Instance APIsceTransformations
for interacting with the Transformations APIsceBulk
for interacting with the Bulk APIs
Build
npm install
npm install -g gulp
npm install -g bower
bower install
gulp build
PROTIP: gulp build
creates two distribution files in the /dist
folder, one concatenated and one minified
Testing
Tests are run using Karma, mochajs and chai.js
To test files in the /src
directory:
gulp test-src
To run all tests (runs against src
and dist
):
gulp test
Installation for an Angular project
npm install angular-cloud-elements --save
Usage
Include the source file available in the /dist
folder
<script src="node_modules/angular-cloud-elements/dist/angular-cloud-elements.js"></script>
A minified version is also provided
<script src="node_modules/angular-cloud-elements/dist/angular-cloud-elements.min.js"></script>
Then, in your module include angularCloudElements
:
angular.module('myApp', ['angularCloudElements']);
Lastly, set the configs using the ceAuth
service:
angular.module('myApp')
.controller('myController', ['ceAuth', function(ceAuth) {
function onLogin() {
ceAuth.setConfig({
userSecret: 'a valid user secret',
orgSecret: 'a valid org secret',
baseUrl: 'base url of environment you are using'
});
}
}])