Skip to content

Instantly share code, notes, and snippets.

@JPaulDuncan
JPaulDuncan / broadcast.service.ts
Created October 21, 2021 16:06
Using BroadcastChannel - Typescript
import {EventEmitter, Injectable, OnDestroy} from "@angular/core";
/**
* Interface to ensure broadcast message uniformity.
*/
export interface IBroadcastMessage {
source: string;
target: string;
action: string;
payload: any;
<!-- Simple Binding -->
<input type="submit" value="OK" data-bind='widget: "button"' />
<!-- Complex Binding with options -->
<input id='search' data-bind='widget: { name: "autocomplete", options: { source: searchCompletions(), delay: 500 } }, value: searchString' />
@orangutanboy
orangutanboy / DemoHub.cs
Created November 24, 2012 21:15
SignalR Demo
using Microsoft.AspNet.SignalR.Hubs;
using System.Timers;
namespace SignalRDemo
{
public class DemoHub : Hub
{
private readonly DemoTimer _demoTimer;
public DemoHub()