Posts

How to Create a Self Signed Certificate in IIS 7

I know I am going to want this link again in the future!

VSTO Office plugin not appearing in Office 2007

If you have an office VSTO plugin that is working in other versions of Office but not appearing in Office 2007 then try setting the following registry value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Common\General\ Name = EnableLocalMachineVSTO Value (DWORD) = 1

Watching a single property in an array in AngularJS

A typescript example that converts the array's property into a single string that can be watched. $scope . $watch ( () => this . someArray . map ( x => x . selected ? "1" : "0" ). join ( "" ), ( newValue , oldValue , scope ) => this . onSelectionChanged ( this . getSelectedItems ()));

Getting an AngularJS directive to call back a method on its parent's controller

Here is a TypeScript example of how to call back a method on the controller from an embedded directive. The most important thing to note is that the directive's parameter name for your callback uses a & when defined, and when calling that callback you should not use positional parameters but instead use an object with properties having the names of the parameters in the target. Register the directive when you create your app module: module MyApp { var app : angular . IModule = angular . module ( "MyApp" ); MyApp . Directives . FileUploader . register ( app ); } The registration code is as follows: module MyApp . Directives . FileUploader { class FileUploaderDirective implements angular . IDirective { public restrict : string = "E" ; public templateUrl : string = "/app/Directives/FileUploader/FileUploaderDirective.html" ; //IMPORTANT - Use & to identify this as a method reference

AngularJs - binding HTML

The directive ng-bind will escape HTML to avoid data acting maliciously. If you want to output html you need to use ng-bind-html <div ng-bind-html="someHtmlBody"/> The important step to getting this working is to ensure the script angular-sanitize.js is referenced on your page, and it is specified as a dependency when creating a module.... var app = angular.module("MyApp", ["ngSanitize", "OtherDependencies"]);