BlueSpire/Durandal — pull request #526 by arash16 (2014-05-24 00:46:54+00:00)
Title: Complete Hierarchical Routers

Hierarchical routers with no constraint on depth, with complete life-cycle checking.
However there's some changes that are not backward compatible and may break.

Here's a summary of changes, tomarrow I'll try to explain changes and new possibilities in depth.

- createChildRouter may be called first time when module is acquired by requirejs, or in activation life-cycle functions, parent is first router to activate or require it, not the one created through.
- "router:route:activating" is triggered after canDeactivate/canActivate calls, before real activation.
- activation life-cycles cannot return redirect tokens, but they may call navigate and return false
- navigate calls on non-root routers is relative if they specify fromParent, however may be disabled by specifying relativeNavigate=false
- after navigating out of a child-router's page, all pages under that are completely deactivated
- for reusable modules, isClose is false for canDeactivate and deactivate, for other modules isClose is true.

- no more rootRouter.explicitNavigation & rootRouter.navigatingBack, i have removed them in favor of clean code, however i see no use case for them.
- loadUrl returns false if currently router is processing, else returns a promise which is resolved when navigation completes (end of activation, not composition)

- there's a issue with cached views (when cache is enabled for root router, pages with child-router.