0

I use angular 1.5 and the last bootstrap & ui-bootstrap versions.

I want to interger angular-confirm module in my application but i don't found the required modal

Usage

This module depends on Angular-UI bootstrap for its $modal service

For example this fail:

angular.module('myApp', ['angular-confirm'])
  .controller('MyController', function($scope , $modal , $confirm) {
});

Error: $injector:unpr Unknown Provider

Unknown provider: $modalProvider <- $modal <- $confirm

Where can i download $modal because it is not in angular-ui-bootstrap.js ?

What i'm missing ?

I create a plunkr http://plnkr.co/edit/WpM3D0vZLMnjgjaESasV?p=preview

1 Answer 1

2

In latest versions of angular-bootstrap (>= 0.14), $modal has been renamed to $uibModal, so you need to inject that one:

.controller('MyController', function($scope , $uibModal , $confirm) {
    ...

The documentation of angular-confirm has not been adjusted.

Sign up to request clarification or add additional context in comments.

2 Comments

yes thank you. In fact i didn't need to inject $uib-modal. the code of the example in angular-confirm is not up to date ( the one from their github was and use directly $uib-modal )
Nice, but I think you mean $uibModal not $uib-modal. The uib-modal syntax is from the associated CSS.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.