Posts tagged "Code"
‹ all tags-
Going Static with Hugo
I have just converted this website from an AngularJS app backed by the Wordpress REST API to a static HTML site powered by Hugo, a static site generator written in Go. This post explains my reasoning, experiences and thoughts about the results. Back in 2014 I was learning … read more › -
Components with Custom Templates in Angular 2 (beta.7)
Want to create a reusable Angular 2 component which can be customized with a user-provided template? I had this use case and could not find any relevant documentation or tutorials, so after a few days digging around the internals on Angular 2, I am sharing the result of my … read more › -
Fixing Chrome Autofill: Mysterious Wrong Values Solved
On an ecommerce website I maintain, we started running into a strange issue where we were getting orders coming in with the first line of the address being duplicated in the “delivery instructions” field. This was causing all sorts of confusion and mild distress at … read more › -
Automatic @import of Less/Sass files with Gulp
This post describes a way to use Gulp to automatically @import Less files from anywhere in your project’s folder structure. It is useful if you want to define self-contained components that put all HTML, JavaScript and LESS files together, yet you don’t want to … read more › -
angular-wordpress-seed: A complete example project with AngularJS and the WordPress JSON REST API
Last September I wrote a post detailing how I went about re-building this website with AngularJS backed by WordPress. That write-up was a high-level discussion on my choice of tools, design decisions, and lessons learned, rather than specific implementation details. The article … read more › -
A Note on Angular Expressions And JavaScript Identifiers
A variable used in an Angular expression cannot contain a hyphen. This might be obvious to some, but this issue on one of my GitHub repos baffled me for a while, and the solution was really simple and now seems totally obvious to me. I’m making a public note of it so that I … read more › -
Exploring ES6 Classes In AngularJS 1.x
In this post I will describe a way of using ES6 classes today in your AngularJS 1.x applications. This is intended more as an exploration than a recommendation of best practice. I’ll go into quite some detail about the reasoning and process behind my solution, but if … read more › -
Building a 3D Game with CSS + HTML
I have recently been exploring some of the lesser-used features of CSS - namely 3D transforms and animations. For a recent talk I gave at a local JavaScript user group, I put together this demo, and in doing so I became really curious about just how far the 3D capabilities of … read more › -
Writing Multi-Element Directives in AngularJS
AngularJS 1.2 introduced a new feature for the ngRepeat directive which allows the directive to span multiple elements, as opposed to just the single element that it is attached to. This is done by appending -start and -end to the directive name in your view: <tr … read more › -
CSS + JavaScript 3D Butterfly: A Case Study
I’ve recently been having lots of fun with CSS 3D transforms and animations. As part of a demo for a talk I am giving at the ViennaJS meetup group this month, I put together a demo that showcases how some fairly sophisticated 3D effects can be achieved with pure CSS, and … read more ›