Change scope logic in modal directive