Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="//builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="//builds.emberjs.com/tags/v1.7.0/ember.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
   <script type="text/x-handlebars" id="index" > <button  {{action  "select"   on="click"}} >OK </button> 
 {{outlet}}
</script>
  
  <div style="bindhere" ></div>
</body>
</html>
 
App = Ember.Application.create();
App.IndexController = Ember.ObjectController.extend({
    actions: {
        select: function(param1, param2) {
          
          
               Ember.TextField.create({
                   
                    classNames: ['btn btn-sm btn-danger glyphicon glyphicon-pencil'],
                    type:               'button',
                    attributeBindings:  ['value'],  value:  "New Button",
                    action:  '{{formeditchangefinder}}' ,
                    onEvent: 'click',
                    //attributeBindings:  ['on'],  on:  ['click']
                   eventManager: Ember.Object.create({
                       click: function(event, view) {
                           alert("working"+elementname);
                       }
                   })
                }).append();
          
          
        }
    }
});
Output

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

Dismiss x
public
Bin info
RaguNspro
0viewers