Category Archives: angular-dart

How to set up Apache to allow direct routing in AngularDart?

I have a farly simple AngularDart application which does nothing but show two different views. My issue is that I can not browse the non-default route directly (e.g. http://www.example.com/login) as Apache says the requested URL was not found on this server - which is pretty much correct because these routes are virtual, right?

So, my question is: how to I set up Apache correctly? Is there some mod_rewrite rule or anything that can pass the URL to my app? Right now the virtual host is a simple virtual host, no extra sugar.

Any suggestions to solve this issue are welcome!


Also, so that we have some foundation to discuss about if needed, here is my routing configuration:

views.configure({
    'login': ngRoute(
        path: '/login',
        view: 'views/security/login.html'
    ),
    'index': ngRoute(
        path: '/',
        defaultRoute: true,
        view: 'views/index.html'
    )
});