Skip to content

Instantly share code, notes, and snippets.

@olliemaitland
olliemaitland / TileDirective
Created July 18, 2013 07:52
Tile directive on the Oracle and Push demo
define(['App', 'jquery', 'ValueDirective','DiffusionDirective', 'EventsService'], function(App, $) {
App.directive('orcTile', ['DiffusionService', 'Events', function(DiffusionService, Events){
var linker = function(scope, iElement, iAttr) {
scope.showMode= 'normal';
scope.tryCount = 0;
scope.spread = '';
scope.skew = '';
scope.msg ={bid:{},ask:{}};
scope.isLocked = false;
scope.lockTryCount = 0;
@olliemaitland
olliemaitland / DiffusionService
Last active December 19, 2015 22:28
DiffusionService used on the Oracle and Push Technology demo
define(['App'], function(App) {
console.log('Orc Service', App);
App.factory('DiffusionService' , ['$http', 'Events', function($http, Events) {
return {
is_connected: false,
diffusion_client: null,
connect_hasBeenCalled: false,
connect: function (topic, scope){
var self = this;
self.connect_hasBeenCalled = true;