I want to set up a httpInterceptor to show a common modal dialog when a http request fails. I'm using https://angular-ui.github.io/bootstrap/ for the modal dialog.
I tried
app.config(function ($httpProvider, $uibModal) { ...
but got the error [$injector:modulerr] Failed to instantiate module app due to: Error: [$injector:unpr] Unknown provider: $uibModal
This answer indicates it's only possible to pass providers when configuring, so I then tried
app.config(function ($httpProvider, $uibModalProvider) {
which works up the point where I want to open the modal
var modalInstance = $uibModalProvider.open(
and I get the error that the object doesn't support the proprty or method open. How do I get from the provider to a modal instance or is there another way of achieving this?