title: How to subclass an Ember class using ES6 syntax in Ember CLI
body: <p>I'd like to create a custom Route class in Ember CLI. I have the following example working in an older app written with globals:</p>
  
  <pre><code>App.AuthenticatedRoute = Ember.Route.Extend({ 
    beforeModel: function() { 
      //Do some things
    }
  });
  
  App.DashboardRoute = App.AuthenticatedRoute.Extend({});
  </code></pre>
  
  <p>I'm familiar enough with ES6 modules to know that the example would look something like this...</p>
  
  <pre><code>var AuthenticatedRoute = Ember.Route.Extend({
    beforeModel: function() { 
      //
    }
  });
  
  export default AuthenticatedRoute;
  </code></pre>
  
  <p>...but I'm curious about the following:</p>
  
  <ol>
  <li>Where would this live in the app structure?</li>
  <li>How do I access this subclass in other modules?</li>
  </ol>
  
  <p><strong>Update:</strong></p>
  
  <p>To clarify my question: I was looking for information about where a custom implementation like this should live as opposed to a regular child route living in the app/routes dir. Ember CLI docs call out the following: </p>
  
  <p><code>To provide a custom implementation for generated routes (equivalent to App.Route when using globals), use app/routes/basic.js.</code></p>
  
  <p><a href="http://www.ember-cli.com/#module-directory-naming-structure" rel="nofollow">http://www.ember-cli.com/#module-directory-naming-structure</a></p>
  
  <p>...but I was not able to find any examples of this in practice, and it seems like an incomplete convention. I ended up treating the custom implementation as a standard route (app/routes/authenticated.js) and importing as needed. </p>