How to use the navigation.StateController function in navigation

To help you get started, we’ve selected a few navigation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github grahammendick / navigation / NavigationReact / sample / isomorphic / index.js View on Github external
NavigationServer.getProps(function(props){
		Navigation.StateController.navigateLink(req.url);
		res.write('<style>')
		res.write('table{border-collapse:collapse;}table,td,th{border:1px #000 solid;}')
		res.write('.label{margin-left:50px;width: 100px;float:left;}')
		res.write('</style><div id="content">')
		res.write(React.renderToString(React.createElement(NavigationShared.getComponent(), props)));
		res.write('</div>')
		res.end();
	});
}).listen(8080);
github grahammendick / navigation / NavigationReact / sample / isomorphic / index.js View on Github external
if (matches) {
		PersonSearch.search(+matches[1], function(people){
			res.write(JSON.stringify(people));
			res.end();
		});
		return;
	}
	matches = req.url.match(/^\/data\/person\/(\d+)$/);
	if (matches) {
		PersonSearch.getDetails(+matches[1], function(person){
			res.write(JSON.stringify(person));
			res.end();
		});
		return;
	}
	Navigation.StateController.navigateLink(req.url);
	NavigationServer.getProps(function(props){
		Navigation.StateController.navigateLink(req.url);
		res.write('<style>')
		res.write('table{border-collapse:collapse;}table,td,th{border:1px #000 solid;}')
		res.write('.label{margin-left:50px;width: 100px;float:left;}')
		res.write('</style><div id="content">')
		res.write(React.renderToString(React.createElement(NavigationShared.getComponent(), props)));
		res.write('</div>')
		res.end();
	});
}).listen(8080);