当我尝试调用 openDialog 函数表单视图时,出现以下错误 ngDialog.open is not a function here is my code
(function () {
'use strict';
angular
.module('app.user')
.controller('userController', Controller);
Controller.$inject = ['$rootScope', '$log', 'ngDialog', 'tpl','DataService'];
function Controller($rootScope, $log,ngDialog,tpl, DataService) {
var vm = this;
vm.user = {};
vm.createUser = function() {
DataService.createUser(user);
}
vm.openDialog = function() {
$log.log('vm.openDialog is running')
ngDialog.open({
template: 'createUser',
className: 'ngdialog-theme-default'
})
}
activate();
function activate() {
}
}
})();
那么可能是什么问题?谢谢你 。