Angular 2, JavaScript, ng2-dynamic-dialog, Programming, TypeScript

Merging CSS Classes for use with ngStyle

For the release of ng-dynamic-dialog v2, I wanted to move away from defining the dialogs look in TypeScript and use standard CSS classes. This would allow the style of the dialog to be defined alongside the rest of a websites style, and make it compatible with CSS preprocessors like LESS and SASS. What Was I… Continue reading Merging CSS Classes for use with ngStyle

Angular 2, JavaScript, TypeScript

Angular 2 – Dynamically Injecting Components

Note this also covers upgrading from RC4 to RC5's ComponentFactoryResolver. I recently upgraded from RC4 to RC5 and as a result my dynamic component injection module failed due to ComponentResolver being deprecated. Of all the changes between RC4 and RC5, this seems to be the simplest deprecation step, but though I'd document it here. Generating… Continue reading Angular 2 – Dynamically Injecting Components

JavaScript, TypeScript

TypeScript, ‘this’ Scope and JavaScript callbacks

Using 'setInterval' caught me out today Now given any object orientated library, you would expect that after every 400 milliseconds you would get a '1' in the output log. 'setIntervalCallback' is a member function of SetIntervalTest, it references 'this' which scope out dicate to be the instance of SetIntervalTest we're running in. But instead of… Continue reading TypeScript, ‘this’ Scope and JavaScript callbacks