I have these two views:
1) foo.html
Hello {{name}}
2) foo-as-modal.html
One way to do this is to resolve $uibModalInstance
in the route with null (or an empty string/or whatever you please) and inject it into the controller. If the html page isn't opened as a modal, you still have $uibModalInstance
. If it's opened as a modal, $uibModalInstance
is automatically injected.