1.2.2 • Published 6 years ago

pentcloud-angular-mdl-dialog v1.2.2

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

pentcloud-angular-mdl-dialog

Angular directive for HTML's new native Dialog tag. Also supports MDL dialogs.

Angular wrapper for HTML5 dialogs.

Usage :

  • If you use npm, set your npm registry to npm.pentcloud.com (npm set registry http://npm.pentcloud.com) and then run npm install pentcloud-angular-mdl-dialog.
  • If not, download files from the github repo.

<script src="angular.min.js"></script>
<script src="pentcloud-angular-mdl-dialog-min.js"></script>
  • Add the pentcloud-angular-mdl-dialog module as a dependency to your application module:
angular.module('MyApp', ['pentcloud-angular-mdl-dialog']);
  • Add a ng-mdl-dialog attribute to any element with the name of a $scope variable that will be created to contain you dialog instance.
  <dialog class="mdl-dialog" ng-mdl-dialog="createDialog">
    <!-- Your content goes here -->
  </dialog>
  • Use the show() or showModal() method to show the dialog.
$scope.createDialog.showModal();
  • Use the close() method to close the dialog.
$scope.createDialog.close();

Official methods and events documentation here

1.2.2

6 years ago

1.2.0

6 years ago

1.0.1

7 years ago