This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div class="loading"> | |
<div class="circle one"></div> | |
<div class="clearfix"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
padding:50px; | |
} | |
.loading .text{ | |
font-size:1em; | |
color:red; | |
margin-bottom:10px; | |
font-family:helvetica; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp') | |
.controller('myCtrl', function ($scope, Azureservice) { | |
var data = { | |
name:'Terry Moore', | |
company: 'Cardinal Solutions', | |
}; | |
$scope.save = function(){ | |
Azureservice | |
.insert('myAzureTable', data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp') | |
.controller('myCtrl', function ($scope, Azureservice) { | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp', ['azure-mobile-service.module']); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… | |
return { | |
insert: function(tableName, obj){ | |
if (isNullOrUndefined(tableName)){ | |
console.error('Azureservice.insert: You must specify a table name'); | |
return null; | |
} | |
if (isUndefinedOrNotAnObject(obj)){ | |
console.error('Azureservice.insert: You must specify the insert object'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('azure-mobile-service.module', []) | |
.service('Azureservice', function Azureservice($q) { | |
var API_URL = 'https://<AZURE_APP_NAME>.azure-mobile.net/'; | |
var API_KEY = '<AZURE_APP_API_KEY>'; | |
var MobileServiceClient = WindowsAzure.MobileServiceClient; | |
var client = new MobileServiceClient(API_URL, API_KEY); | |
var getTable = function(tableName){ | |
return client.getTable(tableName); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://ajax.aspnetcdn.com/ajax/mobileservices/MobileServices.Web-1.1.3.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('azure-mobile-service.module', []) | |
.service('Azureservice', function Azureservice() { | |
return { | |
}; | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var writeToLog = function(project, service, data){ | |
var date = new Date(); | |
var directory = properties.baseDir + '/logs'; | |
fs.exists(directory, function (exists) { | |
if (!exists){ | |
fs.mkdirSync(directory); | |
} | |
for (var key in data) { |