adding an angular directive for button checking