Move ContactsmanagerController to ContactsmanagerModalController. Create new controllers: ContactsmanagereditController and ContactsmanagereditModalController from contactsmanageredit directive.