We're updating the issue view to help you get more done. 

Allow modules with route of / to be in take over mode

Description

This is possible now, but with some messy boiler plate. The only reason it doesn't work is because the regex of / in the routing service doesn't match any routes since we strip the leading slash so /foo actually comes through as foo/.

Adding this check into our if statement will allow a route of `/` to match anything which will cause the routing service to properly enter the module routes for that module.

1 OR _routes[ i ].regexPattern == '/'

Also, when we detect a module in take over mode, should we add the `/parent` route by default, or leave that up to the developer? Perhaps a this.parentRoute in the moduleconfig? Not sure if that is really necessary or just bloat since it's really just a couple lines of code in onLoad() to manually do that.

Status

Assignee

Luis Majano

Reporter

Brad Wood

Labels

None

Components

Priority

Major