4
votes

I'm using Ember-CLI to develop my Ember App.

I have a "super" route (in routes/authenticate.js), like this:

import Ember from 'ember';

export default Ember.Route.extend({
});

I want to make it the base class for some other routes in my app, like this (route/home.js):

import Ember from 'ember';

export default App.AuthenticatedRoute.extend({
});

It doesn't work. Console says: Uncaught ReferenceError: App is not defined

Ember-CLI guide doesn't have any word on this scenario (which I believe is essential).

Anyone know how to do it correctly and in the most simple way?

Thanks, Raka

1

1 Answers

5
votes

I found the answer: http://discuss.emberjs.com/t/base-route-in-ember-cli/7103

import Authenticated from './authenticated';

export default Authenticated.extend({
});