Skip to content

Instantly share code, notes, and snippets.

@ewahner
Created February 16, 2015 19:50
Show Gist options
  • Save ewahner/732ba7815befed5defee to your computer and use it in GitHub Desktop.
Save ewahner/732ba7815befed5defee to your computer and use it in GitHub Desktop.
'use strict';
angular.module('ConnectionHistoryServices', ['ngResource'])
.service('shared', function($rootScope) {
var aggId = 0,
activeTab = 1,
broadcastChanges = function() {
$rootScope.$broadcast('SharedChange');
};
return {
AggId: aggId,
ActiveTab: activeTab,
BroadcastChanges: broadcastChanges
};
})
.factory('services', function($resource) {
return $resource('/api/ConnectionHistory/:action', { action: '@action' },
{
aggList: { method:'GET', isArray: false},
detailList: { method: 'GET', params: { aggid: 'aggid', page: 'page', pageSize: 'pageSize'}, isArray: false },
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment