lightarhont
@lightarhont
python/php developer

Что использовать вместо Marrionette.Controller?

Что то я недопонял.
Написал код через контроллер, и открыл вот что:


Warning: deprecated. The Controller object is deprecated. Instead of using the Controller
class with the AppRouter, you should specify your callbacks on a plain Javascript object.

marionettejs.com/docs/v2.4.1/marionette.controller.html

И как реализовать тогда контроллер+роутер?
  • Вопрос задан
  • 218 просмотров
Решения вопроса 1
Before Marionette 2.1, the Controller had another use, which was a general-purpose, white-label object. This was confusing given its other use within the Router, and its name, which carries so much meaning in the context of MVC frameworks.
As of v2.1, a new Class is available for your use: Marionette.Object. We recommend using Marionette.Object instead of Marionette.Controller in all situations outside of the Router.

marionettejs.com/docs/v2.4.1/marionette.controller...

Ну а в роутер предлагается передавать объект, как, например, здесь.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы