cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              div.main-area(ng-app='app')
  div.control-panel(ng-controller='controlPanel')
    h3 Spinner Demo
    hr
    button.btn.btn-success.btn-sm(ng-click="spinnerService.show('spinner1')") Show Spinner 1
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hide('spinner1')") Hide Spinner 1
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.show('spinner2')") Show Spinner 2
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hide('spinner2')") Hide Spinner 2
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.show('spinner3')") Show Spinner 3
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hide('spinner3')") Hide Spinner 3
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.show('spinner4')") Show Spinner 4
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hide('spinner4')") Hide Spinner 4
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.show('spinner5')") Show Spinner 5
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hide('spinner5')") Hide Spinner 5
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.show('spinner6')") Show Spinner 6
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hide('spinner6')") Hide Spinner 6
    br
    hr
    button.btn.btn-success.btn-sm(ng-click="spinnerService.showGroup('foo')") Show Group Foo
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hideGroup('foo')") Hide Group Foo
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.showGroup('bar')") Show Group Bar
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hideGroup('bar')") Hide Group Bar
    br
    button.btn.btn-success.btn-sm(ng-click="spinnerService.showGroup('baz')") Show Group Baz
    button.btn.btn-danger.btn-sm(ng-click="spinnerService.hideGroup('baz')") Hide Group Baz
    br
    hr
    button.btn.btn-success.btn-lg(ng-click='spinnerService.showAll()') Show All
    button.btn.btn-danger.btn-lg(ng-click='spinnerService.hideAll()') Hide All
    br
    hr
    a(href='https://github.com/codetunnel/angular-spinners', target='_blank') Want the bower package?
  // Notice that the .spinners element below has no controller and is not managed by the controller that governs the button panel.
  div.spinners
    div.spinner
      spinner(name='spinner1', group='foo', img-src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/10607/spinner1.gif')
    div.spinner
      spinner(name='spinner2', group='foo', img-src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/10607/spinner1.gif')
    div.spinner
      spinner(name='spinner3', group='baz', img-src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/10607/spinner2.gif')
    div.spinner
      spinner(name='spinner4', group='bar', img-src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/10607/spinner3.gif')
    div.spinner
      spinner(name='spinner5', group='baz', img-src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/10607/spinner2.gif')
    div.spinner
      spinner(name='spinner6', group='bar', img-src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/10607/spinner3.gif')
            
          
!
            
              body {
  font-family: arial;
  padding: 15px;
}

button.btn {
  margin-bottom: 5px;
}

.control-panel {
  border: solid 1px #000;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 5px 5px 5px;
  width: 300px;
  text-align: center;
  background-color: #ddd;
  display: inline-block;
}

.spinners {
  display: inline-block;
  border: solid 0px #000;
  border-radius: 15px;
  margin-left: 15px;
  padding: 15px;
  width: 100px;
  vertical-align: top;
}

.spinner {
  display: block;
  margin-top: 10px;
  width: 75px;
  height: 75px;
  position: relative;
  border: solid 1px #666;
  box-shadow: 2px 2px 2px #777;
}

.spinner img {
  width: 100%;
  height: 100%;
}

.main-area {
  width: 500px;
  margin: auto;
}
            
          
!
            
              var app = angular.module('app', ['angularSpinners']);

app.controller('controlPanel', function ($scope, spinnerService) {
  $scope.spinnerService = spinnerService;
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console