如何正确使用ngDialog

时间:2015-11-02 11:51:30

标签: javascript angularjs

我正在使用角度js和节点js创建Web应用程序。我在我的应用程序中使用ngDialog。但我得到了错误:

Error: a.on is not a function
this.$get</A.activate@http://localhost:4300/js/lib/ng-dialog/js/ngDialog.min.js:2:1673
this.$get</B.open/</<@http://localhost:4300/js/lib/ng-dialog/js/ngDialog.min.js:2:8374
timeout/timeoutId<@http://localhost:4300/js/lib/angular/angular.js:9391:28
completeOutstandingRequest@http://localhost:4300/js/lib/angular/angular.js:2986:7
Browser/self.defer/timeoutId<@http://localhost:4300/js/lib/angular/angular.js:3266:7

这是我的代码:

function DashboardCtrl($scope, $http, $location, $routeParams,HomeOwners,ngDialog) {
     $scope.changeImage = function (id) {
console.log(ngDialog) // code works fine here
        ngDialog.open({
        template: '<p>my template</p>',
        plain: true
    });
}

请帮助

0 个答案:

没有答案