This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// General resource format: | |
{ | |
metadata: [ // array of metadata objects | |
{ "<any-string1>": <any-json> }, | |
{ "<any-string2>": <any-json> }, | |
"<any-string3>" // short hand for { "<any-string3>": null }, | |
... | |
], | |
data: <any-javascript-value> // e.g. string, number, boolean, object, array |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
"use strict"; | |
var copyOwnProperties = function (from, to) { | |
for (var propertyName in from) { | |
if (from.hasOwnProperty(propertyName)) { | |
to[propertyName] = from[propertyName]; | |
} | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="angular.d.ts"/> | |
class KittenController { | |
constructor( | |
private $scope: ng.IScope, | |
private debounce: IDebounce | |
) { | |
this.watchForSizeChanges(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>TypeScript AngularJS Controller Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" /> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.3/angular.min.js"></script> | |
<script src="app.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MailSender | |
{ | |
// Call this from Application_Start in Global.asax.cs | |
public static void Init() | |
{ | |
var viewRenderer = new EmailViewRenderer(ViewEngines.Engines) {EmailViewDirectoryName = "Emails"}; | |
var emailParser = new EmailParser(viewRenderer); | |
Email.CreateEmailService = ()=>new EmailService(viewRenderer, new PremailerEmailParser(emailParser), ()=>new SmtpClient()); | |
} | |
OlderNewer