I downloaded the ngDialog package using the gazebo. therefore ngDilaog related CSS and JS files are in bower_components.
I have added the following CSS and JS files to my html page.
<link rel="stylesheet" href="../bower_components/ng-dialog/css/ngDialog.css"> <link rel="stylesheet" href="../bower_components/ng-dialog/css/ngDialog-theme-default.css"> <link rel="stylesheet" href="../bower_components/ng-dialog/css/ngDialog-theme-plain.css"> <script src="../bower_components/ng-dialog/js/ngDialog.js"></script>
In my own JS file, I open the dialog as follows:
ngDialog.open({ template : 'dialog' ,scope : $scope , className: 'ngdialog-theme-default', plain: false, showClose: true, closeByDocument: true, closeByEscape: true, appendTo: false});
here is the html code:
<script type="text/ng-template" id='dialog'> <div class="ngdialog-message"> Hello!! </div> </script>
With the above changes, I can show a popup in the center of the screen.
can use the following class to pop up.
className: 'ngdialog-theme-plain' className: 'ngdialog-theme-default'
Hope this helps!
Danda source share