How to build a directive in Angular.js - part 1