We have a somewhat unique file structure in our app where we put some components in top-level directories off of app/
(ex. app/widget
).
One of the issues this causes is that Ember doesn't register the controllers or views in app/widget
with the container. It's easy enough to work around this by registering controllers and views but I'm not sure where the best place to do this is. Right now, we're using the routes so if your routed to an area of the app that needs a controller or view, it will be registered in route.init()
.
I'd like to improve on the above approach by following Ember's lifecycle and registering controllers and views when Ember does it. But, I don't know when or where Ember registers the necessary pieces.
Thanks!
Aucun commentaire:
Enregistrer un commentaire