Passing named arguments to a directive’s callback

Imagine that you’re writing a directive to show a login form. This directive would also check your credentials and call an external function if they’re wrong. You could use it like follows :

<login-box on-fail="wizzle()"></login-box>

I’m sure you know how to implement a login form and a couple of HTTP requests. But do you know how to pass named arguments in your callback ? Let’s find out. Continue reading

Visual regression tests with Travis CI and GitHub

I’ve been working hard on the n3-charts library, lately. For those who don’t know what it is, you can have a look [here] (spoiler : it’s a charting library for AngularJS apps). One thing that was really annoying was that each time I added a new feature or fixed a bug (wait, aren’t those the same thing ?), I had to manually copy the JavaScript file, check out the gh-pages branch where I have a bunch of examples, paste the JavaScript in the library JavaScript file, and check if I had unleashed the hounds of hell in my code. That was boring, and repetitive. Wait, isn’t that why we invented computers ? To handle boring and repetitive tasks ? Let’s automate this.
Continue reading

Client-side CSV download with AngularJS

Say you have an array in your AngularJS app. Yeah, that can actually happen. And you want to offer your users the ability to download it as a CSV without any server-side shenanigans. Sounds easy, right ? Wrong.
It took me some time to make this work under the latest Chrome and Firefox, so I thought I’d share it.
Continue reading

Dealing with server-side in AngularJS unit tests

If you’re using AngularJS, chances are you’re writing unit tests (and if you aren’t, shame on you). And if you’re writing unit tests, chances are you have to deal with remotely loaded data. Here’s how to make this a breeze. Continue reading

Monsieur Notebook review

Image

I’ve bought a Monsieur Notebook, A5 size with 192 sheets of ruled paper. It comes with the usual : rubber closure, ribbon marker. No inner pocket though. The main selling argument for this notebook is its cover : a real leather cover. Is it worth it ? Continue reading

Five reasons you’ll use AngularJS for your next JavaScript project

[AngularJS] is a JavaScript framework built to run single page applications (more on that [here]). My opinion is that it’s the future of JavaScript, and here’s why in five short reasons. Continue reading

Moleskine Large Notebook review

Image

This is the famous Moleskine Large Notebook. Large means 13 x 21 cm (5 x 8.25 in). It comes with ruled paper, a ribbon marker, an elastic closure and an inner pocket. Continue reading

Rhodia Webnotebook A5 review

Image

The Rhodia Webnotebook A5 is a 14 x 21 cm (5,83 x 8,27 in) notebook. It contains 192 lined pages (though a dotted and a blank versions are available), and has an inner pocket, a ribbon marker and an elastic closure. Continue reading

Hello… sort of…

Hello. This is, I hope, the first of many posts about programming, writing, reading, experiencing things. I’m not sure exactly where this will lead me.