Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="w/ {{partial}} helper for easy tabbing for emberjs website" />
<meta charset=utf-8 />
<title>JS Bin</title>
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v2.0.0.js"></script>
  <script src="http://builds.emberjs.com/ember-latest.js"></script>
</head>
<body>
  <script type="text/x-handlebars" data-template-name="application">
    <h2>ember query params</h2>
    {{outlet}}
  </script>
  
  <script type="text/x-handlebars" data-template-name="index">
  
    {{link-to 'Main'    (query-params tab="main")}}
    {{link-to 'About'   (query-params tab="about")}}
    {{link-to 'Contact' (query-params tab="contact")}}
  
    <section>
      {{partial tab}}
    </section>
  </script>
  
  <script type="text/x-handlebars" data-template-name="main">
    MAIN
  </script>
  
  <script type="text/x-handlebars" data-template-name="about">
    ABOUT
  </script>
  
  <script type="text/x-handlebars" data-template-name="contact">
    CONTACT
  </script>
  
</body>
</html>
  
 
.active {
  font-weight: bold;
}
section {
  padding: 10px;
  border: 1px solid black;
  margin-top: 10px;
}
 
App = Ember.Application.create({
  LOG_TRANSITIONS: true,
  LOG_VIEW_LOOKUPS: true
});
App.IndexController = Ember.Controller.extend({
  queryParams: ['tab'],
  tab: 'main'
});
Output

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

Dismiss x
public
Bin info
billybonkspro
0viewers