Hangmen game in AngularJS directives like JavaScript