Nette Framework - Route everything to one presenter

跟風遠走 提交于 2019-12-12 01:21:48

问题


I'm using Angular 2 in cooperation with Nette framework and I would like to let my Angular 2 to do all the routing instead of Nette.

Now when I use Angular 2 routing. I get an Unexisting route exception from Nette.


回答1:


To route everything to one specific presenter, simply add a new route into your RouteFactory (commonly in /app/RouterFactory.php).

$router[] = new Route('/<param .+>', 'Homepage:default');

PS: You don't need to use :default action in linking. Homepage will automatically lead to default if there is no action specified.



来源:https://stackoverflow.com/questions/41792239/nette-framework-route-everything-to-one-presenter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!