examples/todo/js/services/router.js
function broadcastStateChanged(fragment) {
		var globMatches = matchGlob(fragment);

		if (!!globMatches) {
			application.broadcast('statechanged', {
				url: fragment,
				prevUrl: prevUrl,
				params: globMatches.splice(1) // Get everything after the URL
			});
		}
	}
function broadcastStateChanged(fragment) {
		var globMatches = matchGlob(fragment);

		if (!!globMatches) {
			application.broadcast('statechanged', {
				url: fragment,
				prevUrl: prevUrl,
				params: globMatches.splice(1) // Get everything after the URL
			});
		}
	}
function broadcastStateChanged ( fragment ) { var globMatches = matchGlob ( fragment ) ; if ( ! ! globMatches ) { application . broadcast ( 'statechanged' , { url : fragment , prevUrl : prevUrl , params : globMatches . splice ( 1 ) // Get everything after the URL } ) ; } }
Gets the fragment and broadcasts the previous URL and the current URL of
the page, ideally we wouldn't have a dependency on the previous URL...
@param   {string} fragment the current "URL" the user is getting to
@returns {void}
Gets the fragment and broadcasts the previous URL and the current URL of the page ideally we wouldn t have a dependency on the previous URL ...