* Writing a directive for checking element index, fire and catch event to change for appropriate title