I'm currently working on integrating an angularUI modular dialog into my application.
Here is a snippet from my controller.js file:
define([ 'app' ], function(app) {
app.controller('TeacherClasses',
[ '$scope', '$http', '$dialog','$location', 'anotherservice',
function($scope, $http, $location, $dialog, anotherservice) {
$scope.opts = {
backdrop: true,
keyboard: true,
backdropClick: true,
template: '/pathto/partial.html'
};
$scope.openDialog = function(studentGroup){
$scope.newClass = angular.copy(studentGroup);
var modal = $dialog.dialog($scope.opts);
modal.open();
}
}]);
return app;
});
I have included the ui.bootstrap.dialog in the angular module within the app.js file:
var myModule = angular.module('myApp',
[ 'ngResource', 'ui', 'infinite-scroll', 'ngDragDrop', 'blueimp.fileupload','ui.bootstrap.dialog', 'ui.bootstrap.modal',
'ui.bootstrap.dropdownToggle', 'LoadingIndicator', 'http-auth-interceptor']);
However, I keep encountering a TypeError: Object # has no method 'dialog' at Object.$scope.openDialog error.
Can anyone help identify what might be causing this issue?