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?