Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
  
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.6/ember.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
  <script src="http://builds.emberjs.com/ember-latest.js"></script>
</head>
<body>
  <script type="text/x-handlebars">
  <form {{action "register" on="submit"}}>
  {{input type="checkbox" checked=isAgreed}}
  {{input type="submit" value="Register" class="btn btn-primary" disabled=isNotAgreed}}
  </form>
</script>
</body>
</html>
 
App = Ember.Application.create({});
App.ApplicationController = Ember.ObjectController.extend({
  content:{
    isAgreed:false
  },
  isNotAgreed:function(){
    return !this.get('isAgreed');
  }.property('isAgreed'),
  actions:{
    register:function(){
      alert("registered");
    }
  }
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
bradleytragerpro
0viewers