From http://stackoverflow.com/questions/14501532/angularjs-directive-tutorials