justinfagnani / route

A client + server routing library for Dart
BSD 3-Clause "New" or "Revised" License
114 stars 40 forks source link

No handler found error when running in Dartium #31

Open marcojakob opened 11 years ago

marcojakob commented 11 years ago

I tried to start the provided example application in Dart Editor. It works when I run it as JavaScript but doesn't work in Dartium.

OS: Win7 64bit Dart SDK: 0.5.1.0_r22072

Error message and log output:

[FINEST] addHandler /one
[FINEST] addHandler /two
[FINEST] listen ignoreClick=false useFragment=false
[FINEST] onPopState handle(/C:/Users/{user}/dart/routing/web/example.html)
[FINEST] handle /C:/Users//{user}/dart/routing/web/example.html
Exception: Illegal argument(s): No handler found for /C:/Users//{user}/dart/routing/web/example.html
Stack Trace: #0      Router._getUrl (package:route/client.dart:48:7)
#1      Router.handle (package:route/client.dart:66:22)
#2      Router.listen.<anonymous closure> (package:route/client.dart:97:15)

Exception: Illegal argument(s): No handler found for /C:/Users//{user}/dart/routing/web/example.html
Stack Trace: #0      Router._getUrl (package:route/client.dart:48:7)
#1      Router.handle (package:route/client.dart:66:22)
#2      Router.listen.<anonymous closure> (package:route/client.dart:97:15)
marcojakob commented 11 years ago

Might be the same problem as discussed in Routes: using fragments

Is there a way to make route work with Dart Editor?

(Thanks for the great work!)

sethladd commented 11 years ago

I think I just ran into this. Using editor + dartium, and route is complaining that it can't find a route for the index.html itself. Which is correct, I never setup a route for home.

hatuan commented 11 years ago

Is there anyway to use route with editor + dartium. I am learning dart web ui with multiple views?

sethladd commented 11 years ago

Any ideas or progress on this?

sethladd commented 11 years ago

Here's the very hacky fix: https://github.com/dart-lang/route/issues/41