Backbone how to implement the pattern state in a dialog box?

I have a dialog box (modal of bootstrap js), which is opened by pressing the button. It starts with the initial condition (input box, enter the phone number button), after sending the numbers to the server, receives a response, if there are errors, in this state, they need to bring in a modal window if everything is OK, then render the window to enter the confirmation code that is sent when the errors, we deduce in the same window, if everything is OK then we draw the window, success. Trying to do using the state pattern. It turns out the state you want to store in the route and, if so, how can it be read from there in the view?
September 19th 19 at 13:21
1 answer
September 19th 19 at 13:23
Question is closed, but still it would be interesting how a single dialog box to vyhodit n States with the number of patterns m, and where to store what is now the state of the window.

Find more questions by tags JavaScriptPatterns of designingBackbone.js