Internal refactor completed in order to improve tree shaking and dead
code removal. The public API, with an exception to ion-slides, has
stayed the same. However, internally many changes were required so
bundlers could better exclude modules which should not be bundled.
Ultimately most changes resorted to removing references to `window` or
`document`, or a module that referenced one of those.
BREAKING CHANGES
ion-slides was refactored to remove the external dependencies, and
rewritten in TypeScript/ES6 modules to again improve tree shaking
abilities.
NavControllerBase is the core of ionic 2 navigation. It handles all the transitions and it is complicated code to follow.
I am refactoring it to allow future developers and contributors to follow it better.
!node.parent now becomes node.isRoot()
ViewController does not remove itself from the stack, but two new auxiliar function in nav controller: _insertView() and _removeView() are used to add a view to the stack.
And so on...
All e2e and unit tests passing...
For some reason, apparently related to the NavOptions.ev field,
this deep copy was turning into an infinite loop on a Nexus 7 / android 5.1.1 webview.
Replace with a non-deep copy since the deep copy is unnecessary in this case.