Dopo aver aggiunto angular-ui-bootstrap e eseguito grunt serve sulla mia app yeoman, funziona perfettamente e il modal che voglio mostrare viene visualizzato correttamente, ma una volta che faccio un grugnito build, ricevo un errore sconosciuto del fornitore nella mia console.angular-ui-bootstrap causa un errore sconosciuto del provider quando minified
<!-- This is what I added in my index.html -->
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
// In app.js I have
angular.module('yeomanApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute',
'ui.bootstrap'
])
e nel controller,
.controller('myCntrl', function ($modal) {
$scope.items = ['item1', 'item2', 'item3'];
$scope.showDeleteWarning = function() {
var modalInstance = $modal.open({
templateUrl: 'deleteWarning.html',
controller: ModalInstanceCtrl,
resolve: {
items: function() {
return $scope.items;
}
}
});
modalInstance.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function() {});
};
// Please note that $modalInstance represents a modal window (instance) dependency.
// It is not the same as the $modal service used above.
var ModalInstanceCtrl = function ($scope, $modalInstance, items) {
$scope.items = items;
$scope.selected = {
item: $scope.items[0]
};
$scope.ok = function() {
$modalInstance.close($scope.selected.item);
deleteVent();
};
$scope.cancel = function() {
$modalInstance.dismiss('cancel');
};
};
};
Ho provato questo e ha trovato Errore: [$ iniettore: CDEP] Dipendenza circolare trovato: sulla mia console. – NSCoder