Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
  <head>
    <script src="https://code.jquery.com/jquery.min.js"></script>
    <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">
    <script src="http://builds.emberjs.com/tags/v1.13.2/ember-template-compiler.js"></script>
    <script src="http://builds.emberjs.com/tags/v1.13.2/ember.debug.js"></script>
  </head>
  <body>
    <script type="text/x-handlebars">
      <h1>Component Actions Example</h1>
      {{!-- block param. note the `yield this` in template --}}
      {{#x-foo as |FOO|}} 
        {{#x-bar}}
          {{#x-bar}}
            {{#x-bar}}
              {{#x-bar}}
                {{#x-bar}}
                  {{!--
                    closure action. read more here:
                    http://emberjs.com/blog/2015/06/12/ember-1-13-0-released.html#toc_closure-actions
                  --}}
                  {{x-baz onClick=(action 'handleClick' target=FOO)}}
                {{/x-bar}}    
              {{/x-bar}}
            {{/x-bar}}
          {{/x-bar}}
        {{/x-bar}}
      {{/x-foo}}
    </script>
    <script type="text/x-handlebars" data-template-name="components/x-foo">
      {{yield this}}
    </script>
    <script type="text/x-handlebars" data-template-name="components/x-baz">
      <button {{action 'buttonClicked'}}>Click me</button>
    </script>
  </body>
</html>
Output

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

Dismiss x
public
Bin info
jasonmitpro
0viewers