Handle generate address action in angular controller.