Controller#needs - Route has dot in it?
I recently had to convert all of my routes to the deeply nested version.
For example: pages.page became books.book.pages.page. It was necessary for
some of the linking I was doing. The problem is that I have a controller
that declares that it needs another controller. Specifically, it needed
the book controller. But now the book controller is the books.book
controller. This presents an issue because this code no longer works:
this.get('controllers.books.book');
Now it thinks that book is just a property of the books controller, when
in reality, it's all one property. How can I resolve this issue? So far
I've tried these methods, none of which work:
this.get('controllers').get('books.book');
this.get('controllers.`books.book`');
this.get("controllers.'books.book'");
No comments:
Post a Comment