View client.js
import ActionCable from 'actioncable' | |
const buildUrl = (url, parameters) { | |
var qs = '' | |
for (var key in parameters) { | |
var value = parameters[key] | |
qs += encodeURIComponent(key) + '=' + encodeURIComponent(value) + '&' | |
} | |
if (qs.length > 0) { | |
qs = qs.substring(0, qs.length - 1) |
View gist:47fe83fa705d70037e26
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
View dabblet.css
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #0f0; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height:100%; |