0.2.0 • Published 10 years ago
angular-cloud-elements v0.2.0
angular-cloud-elements
An AngularJS Library for interacting with the Cloud Elements Platform APIs
Features
ceElementsfor interacting with Elements and Element Instances APIsceFormulasfor interacting with Formulas and Formula Instance APIsceTransformationsfor interacting with the Transformations APIsceBulkfor interacting with the Bulk APIs
Build
npm install
npm install -g gulp
npm install -g bower
bower install
gulp buildPROTIP: 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-srcTo run all tests (runs against src and dist):
gulp testInstallation for an Angular project
npm install angular-cloud-elements --saveUsage
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() {
// obtain secrets
ceAuth.setConfig({
userSecret: 'a valid user secret',
orgSecret: 'a valid org secret',
baseUrl: 'base url of environment you are using'
});
}
}])