Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Ember Starter Kit</title>
  <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/css/foundation.css">
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/vendor/modernizr.js"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.2/js/foundation.js"></script>
  <script src="http://builds.emberjs.com/tags/v1.12.0/ember-template-compiler.js"></script>
  <script src="http://builds.emberjs.com/tags/v1.12.0/ember.debug.js"></script>
</head>
<body>
  <script type="text/x-handlebars">
    <h2>Welcome to Ember.js</h2>
    {{outlet}}
  </script>
  <script type="text/x-handlebars" data-template-name="index">
    {{x-pear}}
    {{x-pear}}
    {{x-pear}}
  </script>
  <script type="text/x-handlebars" data-template-name="components/x-pear">
<button class='tiny has-tip'  data-tooltip class="has-tip" title="Tooltips are awesome, you should totally use them!"{{action 'remove'}}>remove me</button>
  </script>
</body>
</html>
 
/* Put your CSS here */
html, body {
  margin: 20px;
}
 
App = Ember.Application.create();
App.XPearComponent = Ember.Component.extend({
    didInsertElement: function(){
       Ember.$(document).foundation();
    },
    actions: {
        remove: function(){
            this.remove();
            console.log('removed a component');
        }
    }
});
App.IndexRoute = Ember.Route.extend({
  model: function() {
    return ['red', 'yellow', 'blue'];
  }
});
App.IndexController = Ember.Controller.extend({
  actions:{
    
  }
                                       });
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers