Question

Hi I want extend my super route class something like this :

//routes/auth.js
export default Em.Route.extend({
  someFunction:function(){
     //code
  }
});

//routes/test.js
export default App.AuthRoute.extend({
  model: function(){
     return this.someFunction(); //Call function from super class
  }
});

routes/test.js doesnt work -white screen and nothing in console - I do not know naming conventions to get this.

Was it helpful?

Solution

You need to import any other modules that you reference first so that they can be resolved:

import AuthRoute from 'appkit/routes/auth';

export default AuthRoute.extend({
   ....
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top