2

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.

jmeinlschmidt
  • 1,446
  • 2
  • 14
  • 33

1 Answers1

2

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.

jmeinlschmidt
  • 1,446
  • 2
  • 14
  • 33
  • 1
    I like an idea. Maybe you can rename to more suitable name, let's say `ApiPresenter`. – Felix Jan 23 '17 at 10:27