Posts tagged "Code"
‹ all tags-
Experiences Building a Website with AngularJS + WP-API (WordPress API)
I’ve just completed and launched a complete re-write of this website. Since the first iteration (started around nine months ago) and this new one, I’ve learned a lot about the fundamental technologies of the web: HTML, CSS and JavaScript; about AngularJS in … read more › -
A Note on Touch (Pointer) Events in Internet Explorer
Using touch events in your JavaScript app is as simple as adding event listeners like this: myElement.addEventListener('touchstart', myStartHandler); myElement.addEventListener('touchmove', myMoveHandler); myElement.addEventListener('touchend', … read more › -
Enable Rich Social Sharing in Your AngularJS App
If you are building a public-facing app in AngularJS, you’ll want your users to be able to share it via social media. Indeed, for certain apps, this may be the most important channel of promotion. By “rich social sharing”, I mean something like this: Rich … read more › -
Site-Wide Split Tests With Google Analytics Content Experiments
The Problem You use Google Analytics on your website and you want to do an A/B or multivariate test on some site-wide change, rather than just testing variations of a single page. An example - and the scenario which lead me to devise this solution - was testing how the presence … read more › -
Paginate (almost) Anything in AngularJS
The ng-repeat is probably one of the most oft-used of all the core AngularJS directives, and with good reason. It offers amazing flexibility and is probably one of the first things to really “wow” you about the framework. Whenever I’ve used ng-repeat, however, … read more › -
Auto-breadcrumbs with angular-ui-router
For those that don’t know, angular-ui-router is a router for AngularJS that replaces the one that comes built-in, and adds a whole lot of powerful features. I’ve been using it on a project I’m working on and I’ve found the ability to nest routes to be … read more › -
Simple 1D Noise in JavaScript
I am working on a side project in which I needed to generate some “random”, or more accurately, unpredictable motion. At first I tried using the Math.random() method, and using those values to set the position of my moving element. This, of course, looks terrible … read more › -
Audio Visualization with Web Audio, Canvas and the Soundcloud API
Audio visualization Update 05/02/14 - This demo got featured on Google’s Chrome Experiments website! This has generated a lot more interest (as in hundreds of views per day rather than one or two per week) so hopefully we will see some improvements from the community via … read more › -
Using Disqus with AngularJS
Getting the comments platform Disqus to work with your Angular-based website is probably not going to be as simple as dropping in the default Disqus code snippet into your HTML template. Due to the way Angular loads its templates, it is likely that the Disqus script will not get … read more › -
An Ordinal Date Filter for AngularJS
The AngularJS date filter is used to format a time stamp into a human-readable date string. For this website, I wanted to be able to format the date so that the day of the month included the English ordinal suffix, 1st, 2nd, 3rd, 4th etc. Having worked with PHP’s date() … read more ›