I posted a personal recap last year, and the year before that. For this year, I’m calling it “2016: Personal Highlights”: I received my first Microsoft MVP award in Visual Studio and Developmen...
2016: Personal Highlights
Subscribing to Browser Title Changes Using Angular
Angular includes a Title service, which includes getTitle(): string and setTitle(newTitle: string). If you want to keep an in-page header matching the browser title tag, you’ll need something to en...
Angular 2 Services Testing Template
Here’s a simple template for testing Angular 2 services. If the HttpModule portions are uncommented and used, it will make actual wire calls. To use mock calls instead, see Angular 2 MockBackend S...
Angular 2 MockBackend Service Testing Template Using TestBed
Below is a template for using TestBed and MockBackend for mocking Angular 2 HTTP calls. If you want to make actual wire calls, see Angular 2 Services Testing Template instead. import { async, inj...
Angular 2 Component Testing Template Using TestBed
Below is a template for using TestBed to test Angular 2 components. import { async, TestBed } from '@angular/core/testing'; import { SomeComponent } from './some.component'; beforeEach(() => ...
100% Code Coverage Doesn't Mean It Works
Tests are great. I like testing, tests, and talking about testing and tests. I think code coverage is useful. It can identify gaps in testing, providing a “hey, maybe you should test over here” no...
Comparing Classes: C# 6, ES6/ES2015 JavaScript, and TypeScript
Classes are a useful construct typically associated with object-oriented programming. In C# classes are a first-class construct of the language. Classes were introduced a bit later for JavaScript....
We Replaced a Multi-Application Home-Grown Authentication System
On June 9, 2016 I had an amazing opportunity to deliver a talk bearing the name of this post title at NDC Oslo. An embed of the video is at the end of this post. Here’s a write-up: Where We Start...
TypeScript: Where's My C# Style Object Initializers?
In C#, you’re able to initialize an object while newing it up. using System; public class Program { public static void Main() { var person = new Person { Given...
TypeScript: Missing Properties When Using Type Assertions
In C# and other languages, you may be familiar with the concept of a cast – basically, explicitly coercing a type into another type. In C# this looks like (MyClass)x. When using a C# cast, all of ...