When an $ajax call is made in a view's show or beforeShow event, how/when/where should we navigate to another view from the $ajax success or error callback? What I am currently doing does not work properly.
Consider the following example with 3 views:
initialView
errorView
ajaxView
Consider the following example with 3 views:
initialView
errorView
ajaxView
- user starts on initialView and clicks a link to navigate to #ajaxView
- ajaxView does an $ajax call in its beforeShow event.
- on success, the $ajax success callback does some processing and the view is displayed
- on error, the error callback evaluates the error and navigates to #errorView
The above steps don't work. errorView is not displayed. Here is the jsfiddle for above.