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

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

              
                <body ng-app="appModule" ng-keypress="enterKeyPressed($event)">
  <div ng-controller="appController as vm">
    <h1>{{vm.message}}</h1>
    <div>
      <button ng-show="vm.num==1 || vm.num==5" ng-click="vm.click()">Next</button>
      <button ng-show="vm.num>=2 && vm.num<5 || vm.num==6 || vm.num==8" ng-click="vm.click()">Yes/No</button>
      <button ng-show="vm.num==7" ng-click="vm.click()">Approval/Control/Security/Separation/Oneness</button>
    </div>
  </div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                (function() {
  var app = angular.module("appModule", []);
  app.run(function($rootScope) {
    $rootScope.enterKeyPressed = function(e) {
      if (e.keyCode === 32) {
        $rootScope.$broadcast("EnterKeyPressed");
      }
    };
  });
})();

// appController.js
(function(app) {
  app.controller("appController", thisController);
  function thisController($scope) {
    var vm = this;
    vm.click = function() {
      vm.num++;
      if (vm.num == 3 || vm.num == 7) {
        vm.num = Math.round(Math.random());
        if (vm.num == 0) {
          vm.num = 3;
        } else {
          vm.num = 7;
        }
      }
      if (vm.num == 1) {
        vm.message = "What is your now feeling?";
      }
      if (vm.num == 2) {
        vm.message = "Could you welcome this feeling?";
      }
      if (vm.num == 3) {
        vm.message = "Could you welcome any wanting to change this?";
      }
      if (vm.num == 4) {
        vm.message = "Could you welcome taking this personally?";
      }
      if (vm.num == 5) {
        vm.message = "What is your now feeling?";
      }
      if (vm.num == 6) {
        vm.message = "Could you welcome this feeling?";
      }
      if (vm.num == 7) {
        vm.message = "Which want is being stirred up?";
      }
      if (vm.num == 8) {
        vm.message =
          "Could you let this want go, just for right now/as best you can?";
      }
      if (vm.num == 9) {
        vm.num = 0;
        vm.click();
      }
    };

    var init = function() {
      vm.num = 0;
      vm.click();
    };
    init();
    $scope.$on("EnterKeyPressed", function() {
      vm.click();
    });
  }
})(angular.module("appModule"));

              
            
!
999px

Console