Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div ng-controller="AppCtrl" layout="column" layout-margin="" class="dialogdemoBasicUsage" ng-app="MyApp">
      <md-button class="md-primary" ng-click="showAdvanced($event)">
        Custom Dialog
      <md-button class="md-primary" ng-click="showAdvanced($event)">
        Some other button you can try and click even when the popup is on
  <b layout="row" layout-align="center center" layout-margin="">
<script type="text/ng-template" id="dialog1.tmpl.html"><md-dialog aria-label="Mango (Fruit)">
  <md-dialog-content class="sticky-container">
    <md-subheader class="md-sticky-no-effect">Mango (Fruit)</md-subheader>
        The mango is a juicy stone fruit belonging to the genus Mangifera, consisting of numerous tropical fruiting trees, cultivated mostly for edible fruit. The majority of these species are found in nature as wild mangoes. They all belong to the flowering plant family Anacardiaceae. The mango is native to South and Southeast Asia, from where it has been distributed worldwide to become one of the most cultivated fruits in the tropics.

      <img style="margin: auto; max-width: 100%;" alt="Lush mango tree" src="">

        The highest concentration of Mangifera genus is in the western part of Malesia (Sumatra, Java and Borneo) and in Burma and India. While other Mangifera species (e.g. horse mango, M. foetida) are also grown on a more localized basis, Mangifera indica&mdash;the "common mango" or "Indian mango"&mdash;is the only mango tree commonly cultivated in many tropical and subtropical regions.
        It originated in Indian subcontinent (present day India and Pakistan) and Burma. It is the national fruit of India, Pakistan, and the Philippines, and the national tree of Bangladesh. In several cultures, its fruit and leaves are ritually used as floral decorations at weddings, public celebrations, and religious ceremonies.

  <div class="md-actions" layout="row">
    <md-button href="" target="_blank" hide show-md>
      More on Wikipedia
    <span flex></span>
    <md-button ng-click="answer('not useful')" class="md-primary">
     Not Useful
    <md-button ng-click="answer('useful')" class="md-primary">


                .dialogdemoBasicUsage .dialogDemo1 {
  height: 500px; }
.dialogdemoBasicUsage .dialog-demo-content div {
  text-align: center; }
.dialogdemoBasicUsage .md-subheader {
  background-color: #dcedc8;
  margin: 0; }
    pointer-events: none;

    pointer-events: all;




.controller('AppCtrl', function($scope, $mdDialog) {
  $scope.alert = '';
	$scope.userName = 'Johnny';
  $scope.showAdvanced = function($event) {
      hasBackdrop: false,
      targetEvent: $event,
    	template: '<md-dialog>' +
                '  <md-dialog-content>Hello {{ employee }}!</md-dialog-content>' +
                '  <div class="md-actions">' +
                '    <md-button ng-click="closeDialog()" class="md-primary">' +
                '      Close Greeting' +
                '    </md-button>' +
                '  </div>' +
    	controller: function($scope, $mdDialog, employee){
         $scope.employee = employee;
         $scope.closeDialog = function(){$mdDialog.hide();};
        $scope.hide = function() {
        $scope.cancel = function() {
        $scope.answer = function(answer) {
    	locals: {employee: $scope.userName}