Skip to content

ClearBlade/Angular-SDK

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

ipm package: angular-integration

Overview

ClearBlade integration for AngularJS 3

This is an ipm package, which contains one or more reusable assets within the ipm Community. The 'package.json' in this repo is a ipm spec's package.json, here, which is a superset of npm's package.json spec, here.

Browse ipm Packages

Setup

  1. Add to AngularJS dependencies
'use strict';

// Declare app level module which depends on views, and components
angular.module('ClearBladeApp', ['ClearBladeController']).
config(['$routeProvider', function($routeProvider) {
  $routeProvider.otherwise({redirectTo: '/view1'});
}]);
  1. Run npm start

API

ClearBlade

ClearBlade Service

Kind: global variable

ClearBlade.runCode(funcName, params, retryCounter)

Execute a code service within the Cloud Platform

Kind: static method of ClearBlade

Param Type Description
funcName string Code Service Name to run
params Object params object to be ingested by Code Service
retryCounter number number of times to retry executing a code service

ClearBlade.init(email, password)

Initialize ClearBlade Service

Kind: static method of ClearBlade

Param Type Description
email string ClearBlade System's User Email
password string ClearBlade System's User's Password

Usage

$scope.logins = [{ User: {name : 'Rohan'}, Age: 20 }, { User: {name : 'John'}, Age: 18 } ];

var promise = cb.init('test@clearblade.com','rohanbendre');
promise.then(function(resp) {
	$scope.response = resp;

});

$scope.sendRequest = function() {
	var promise = cb.runCode('ServicePart4','' , 2);
	promise.then(function(resp) {
		$scope.result = resp;
	}, function(reason) {
		$scope.result = reason;
	});
};

Thank you

Powered by ClearBlade Enterprise IoT Platform: https://platform.clearblade.com

  • Then start server by doing npm start.

  • SampleCode folder has clearblades angular service and example html/controller files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published