Feat/close

Added close options to the directive.