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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <html ng-app="starter">
  <head>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <link href="//code.ionicframework.com/1.0.0-beta.12/css/ionic.css" rel="stylesheet">
<script src="//code.ionicframework.com/1.0.0-beta.12/js/ionic.bundle.js"></script>
  </head>
   <body  ng-controller="TodoListController as todoList">

    <ion-pane>
      <ion-header-bar class="bar-stable">
        <h1 class="title">Ionic Blank Starter</h1>
      </ion-header-bar>
      <ion-content>

<h1>My list</h1>

<p>
Are any of the things done ? {{todoList.anyYes}}
</p>


 <div>

<ul class="list">
  <ion-checkbox ng-repeat="cri in todoList.criteria"
    ng-model="cri.value"
    class="item-checkbox-right"
    ng-click="todoList.updateAnyYes()"
    >
    {{cri.label}}
  </ion-checkbox>
</ul>

<div ng-show="todoList.shouldShowMessage()">
<button class="button icon-right ion-chevron-right button-balanced">can you</button>
</div>

<div ng-show="! todoList.shouldShowMessage()" >
It is recommended you email yourself a copy of this assessment and add it to your patient's medical records.<br>
<button class="button icon-right ion-chevron-right button-wide button-balanced" >see me</button>
<button class="button icon-right ion-chevron-right button-wide button-balanced" >and me</button>
</div>



      </ion-content>
    </ion-pane>
  </body>
</html>

              
            
!

CSS

              
                
              
            
!

JS

              
                angular.module('starter', ['ionic'])
  .controller('TodoListController', function() {

    var todoList = this;
    todoList.criteria=[
          { id:'aki',value:false,label:'AKI 3'},
          { id:'ckd',value:false,label:'Known CKD stage 4/5'},
          { id:'transplant',value:false,label:'Renal transplant'},
          { id:'haematuria',value:false,label:'Dipstick haematuria'},
          { id:'proteinurea',value:false,label:'Dipstick proteinuria'},
          { id:'nonresolving',value:false,label:'Non-resolving AKI'},
          { id:'noclear',value:false,label:'AKI with no clear cause'}
        ];

    todoList.anyYes=false;

    todoList.updateAnyYes = function() {
      todoList.anyYes=_anyYes( todoList.criteria );
    };


    todoList.shouldShowMessage=function(){
        if( ! todoList.criteria ){
          return false;
        }
        if( todoList.anyYes ){
          return false;
        }
        return true;
      }

    function _anyYes( criteria ){
      if( typeof criteria == 'undefined' ) return false;

      for(var i=0;i<criteria.length;i++){
        if( criteria[i].value == true ){
          return true;
        }
      }
      return false;
    }

  });
              
            
!
999px

Console