Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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-cloak="" class="tabsdemoDynamicHeight" ng-app="MyApp">
  <md-content ng-controller="TesteCtrl as vm">

    <md-switch ng-model="vertical" aria-label="Vertical">
      Vertical
    </md-switch>

    <md-stepper vertical="vertical">
      <md-step ng-repeat="step in vm.steps" label="step.desc">
        <div ng-if="step.id === 1">
          <h2>Setup Your Store</h2>
          <form>
            <md-input-container>
              <label>Domain</label>
              <input type="text" />
            </md-input-container>
            <md-input-container>
              <label>Store Name</label>
              <input type="text" />
            </md-input-container>
          </form>
        </div>
        <div ng-if="step.id === 4">
          <h2>Contact Details</h2>
          <form>
            <md-input-container>
              <label>Phone</label>
              <input type="text" />
            </md-input-container>
            <md-input-container>
              <label>Email</label>
              <input type="text" />
            </md-input-container>
          </form>
        </div>
        <div ng-if="step.id === 2">
          <h2>End User Agreement</h2>
          <form>
            <p>
              By submitting this form you consent that you will abide by the example terms and conditions of this demo!
            </p>
          </form>
        </div>

      </md-step>
    </md-stepper>


    

  </md-content>

  <script type="text/ng-template" id="md-stepper.html">
    <div ng-class="{'vertical':vertical,'horizontal':!vertical }">
      <div ng-hide="vertical" layout="row">
        <div class="step-header" ng-repeat="step in steps" md-ink-ripple layout="row" flex layout-align="center center" ng-class="{'flex-none':$last}" ng-click="setActiveStep(step)">
          <div class="step-circle" flex-none>{{$index+1}}</div>
          <span class="label" flex-none>{{step.label}}</span>
          <div class="line" flex></div>
        </div>
      </div>
      <div ng-transclude></div>
    </div>
  </script>

  <script type="text/ng-template" id="md-step.html">
    <div>
      <div class="step-header" md-ink-ripple layout="row" ng-class="{'flex-none':$last}">
        <div class="step-circle"></div>
        <span class="label">{{label}}</span>
      </div>
      <div class="step-content" ng-show="active">
        <div ng-transclude></div>
        <div layout="row">
          <md-button class="md-raised md-primary" ng-click="nextStep()">Continue</md-button>
          <md-button class="md-raised">Reset</md-button>
          <span flex></span>
          <md-button class="md-raised">Skip</md-button>
        </div>
      </div>

    </div>
  </script>

</div>
              
            
!

CSS

              
                md-stepper .horizontal md-step .step-header {
  display: none;
}

.step-header {
  position: relative;
  padding: 10px;
}

.step-header .label {
  margin: 0 8px;
}

.step-content {
  padding: 10px;
}

md-stepper .vertical md-step .step-content {
  margin: 0 0 0 20px;
  border-left: 1px solid #e0e0e0;
}

.step-header .line {
  margin-right: 8px;
  width: 100%;
  height: 1px;
  background-color: #e0e0e0;
}

.step-circle {
  background-color: #9b9b9b;
}

.step-circle.done {
  background-color: #3f51b5;
}

.step-circle {
  width: 24px;
  height: 24px;
  line-height: 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  text-align: center;
}
              
            
!

JS

              
                angular.module('MyApp',['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
.controller('TesteCtrl', function (){
  this.steps = [{"id":1,"desc":"Aceite","ajuda":"asdfas dfuahsdfas ausdhf"},{"id":4,"desc":"Pagamento","ajuda":"asdfas dfuahsdfas ausdhf"},{"id":2,"desc":"DadosCadastrais","ajuda":"asdfas dfuahsdfas ausdhf"}];
  return this;
})

.directive('mdStepper',function(){
  return {
    restrict: 'E',
    transclude: true,
    templateUrl: 'md-stepper.html',
    scope: {
      vertical:'='
    },
    controller: ['$scope', function($scope) {
       var steps = $scope.steps = [];

      $scope.setActiveStep = function(step) {
        angular.forEach(steps, function(step) {
          step.active = false;
        });
        step.active = true;
      };
      this.nextStep = function() {
        let activeStep = steps.filter((step)=>{return step.active})[0];
        let nextStep = steps[steps.indexOf(activeStep)+1];
          
          if(nextStep){
            activeStep.active = false;
            nextStep.active = true;
          }
      };

      this.addStep = function(step) {
         if (steps.length === 0) {
           $scope.setActiveStep(step);
         }
        steps.push(step);
      }
    }]
  }
})
.directive('mdStep',function(){
  return {
    require: '^^mdStepper',
    restrict: 'E',
    transclude: true,
    scope: {
      label: '='
    },
    link: function(scope, element, attrs, mdStepper) {
      mdStepper.addStep(scope);
      scope.nextStep = mdStepper.nextStep;
    },
    templateUrl: 'md-step.html'
  }
})

              
            
!
999px

Console