examples/todo/js/services/router.js
function(state, title, fragment) {
			prevUrl = history.state.hash;

			// First push the state
			history.pushState(state, title, fragment);

			// Then make the AJAX request
			broadcastStateChanged(fragment);
		}
function(state, title, fragment) {
			prevUrl = history.state.hash;

			// First push the state
			history.pushState(state, title, fragment);

			// Then make the AJAX request
			broadcastStateChanged(fragment);
		}
function ( state , title , fragment ) { prevUrl = history . state . hash ; // First push the state history . pushState ( state , title , fragment ) ; // Then make the AJAX request broadcastStateChanged ( fragment ) ; }
The magical method the application code will call to navigate around,
high level it pushes the state, gets the templates from server, puts
them on the page and broadcasts the statechanged.
@param   {Object} state    the state associated with the URL
@param   {string} title    the title of the page
@param   {string} fragment the current "URL" the user is getting to
@returns {void}
The magical method the application code will call to navigate around high level it pushes the state gets the templates from server puts them on the page and broadcasts the statechanged .