Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

HTML

              
                <div ng-controller="AppCtrl" ng-cloak="" class="buttondemoBasicUsage" ng-app="MyApp">
  <md-content>


    <section layout="row" layout-sm="column" layout-align="center center" layout-wrap="">
      <div class="progress-fab">
        <md-progress-circular class="md-warn" md-diameter="64" ng-hide="color == 'md-warn'" md-mode="determinate" value="{{determinateValue}}"></md-progress-circular>
        <md-button class="md-fab" ng-class="color" aria-label="Eat cake" ng-click="color = 'md-primary'; determinateValue = 0">
          <md-icon md-svg-src="img/icons/ic_comment_24px.svg"></md-icon>
        </md-button>

      </div>

    </section>


  </md-content>
</div>

<!--
Copyright 2016 Google Inc. All Rights Reserved. 
Use of this source code is governed by an MIT-style license that can be in foundin the LICENSE file at https://material.angularjs.org/license.
-->
              
            
!

CSS

              
                .progress-fab {
  position: relative;
  
  > md-progress-circular {
    margin: auto;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    
    path {
        stroke-width: 4px !important;
    }
    
  }
}
              
            
!

JS

              
                angular.module('MyApp', ['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])

.controller('AppCtrl', function($scope, $interval) {
  $scope.title1 = 'Button';
  $scope.title4 = 'Warn';
  $scope.isDisabled = true;
  $scope.color = "md-primary";

  $scope.googleUrl = 'https://google.com';
  $scope.determinateValue = 0;
  // Iterate every 100ms, non-stop and increment
  // the Determinate loader.
  $interval(function() {
    $scope.determinateValue += 2;
    if ($scope.determinateValue > 100) {
      $scope.color = "md-warn";
    }
  }, 100);
});

/**
Copyright 2016 Google Inc. All Rights Reserved. 
Use of this source code is governed by an MIT-style license that can be in foundin the LICENSE file at https://material.angularjs.org/license.
**/
              
            
!
999px

Console