I have an app AppA which is defined in A.js. It uses ng-route with a template TemplateA; but it has two controllers ControllerA1 (Creating) and ControllerA2 (Editing).
I have an other app AppB which is defined in B.js. It uses some ng-route mechanism with various templates TemplateB1, TemplateB2,... and various controllers ControllerB1, ControllerB2,...
I'm using these apps as following: There is an edit button in AppB. When the user clicks the button, it redirects to a url (containing some id info) and AppA will be run (fetching an ng-resource with given id).
Now I want to make editing with a modal dialog rather than a standalone page. But I want the old mechanism in AppA still running.
What is the appropriate way to move AppA to a modal dialog inside AppB by considering the reusability of Templates and Controllers?