Skip to content

Instantly share code, notes, and snippets.

@olliemaitland
olliemaitland / TileDirective
Created Jul 18, 2013
Tile directive on the Oracle and Push demo
View TileDirective
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 Dec 19, 2015
DiffusionService used on the Oracle and Push Technology demo
View DiffusionService
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;