1.0.0-beta.2
christopherthielen
released this
10 Sep 05:57
·
597 commits
to master
since this release
(2016-09-09) diff
Read more about beta.2 on the blog
BC-BREAK
- State Glob patterns have been changed slightly.
Previously, a single wildcard foo.*
could match "missing segments" on the end of a state name.
For example, foo.*
would match the state foo
.
Likewise, foo.*.*.*
would also match the foo
state.
Now, a single wildcard matches exactly one segment.
foo.*
will match foo.bar
and foo.baz
, but neither foo
nor foo.bar.baz
.
If you previously relied on the single wildcard to match missing segments, use a double wildcard, foo.**
.
Double wildcards match 0 or more segments.
-
(obscure) Angular 1 DI token
ng1UIRouter
renamed to$uiRouter
-
(obscure) Renamed
Transition.previous()
toTransition.redirectedFrom()
Features
Core
- lazyLoad: Add state.lazyLoad hook to lazy load a tree of states (bef5257) (8ecb6c6), closes #146 #2739
- StateRegistry: Add
deregister
method. (44579ec), closes #1095 #2711 - redirectTo: Process
redirectTo
property of a state as a redirect string/object/hook function (6becb12), closes #27 #948 - redirect: Error after 20+ redirected transitions (88052bf)
- rejectFactory: separate transition aborted and transition errored reject types (55995fd)
- Resolve: support ng2-like provide object literals (a7e5ea6)
- Resolve: Switch state.resolve to be an array of Resolvables (6743a60)
- Transition: Add the transition source (url/sref) to TransitionOptions (5d42d79)
- Transition: Added
getResolvable(token)
method (3aee2b7) - Transition: expose the current
UiRouter
object as a public property (52f1308) - Transition: expose the transition rejection reason as
Transition.error()
(7a9e383), closes #2866 - Transition: Expose the transition's TargetState as targetState() (f06f6b6)
- urlRouter: Allow a rule to be deleted. (55f3d3d)
ng2
- ng2.rx: Added RxJS Observables for transitions and states: (2a2f381)
- ng2: Add @UIRouterModule decorator (e7bedc2), closes #2922
- ng2: Improve ng2 bootstrap flexibility with provideUIRouter() provider factory function (bc17066), closes #2958
- ng2.UrlRouter: Implement { location: replace } (b8c6146), closes #2850
- ng2.NgModule: Add module's states to DI using UIROUTER_STATES_TOKEN (0cb628e)
- ng2.stateRegistry: Automatically register states defined on a UIRouterModule (58a3c84)
- ng2.UIView: Use merged NgModule/ParentComp to inject routed component (37241e7)
- ng2.upgrade: Enable ng1-to-ng2 (0bf4eb4)
- uiView: Support Components loaded via AppModule (696148f)
Bug Fixes
Core
- defaultErrorHandler: Invoke handler when a transition is Canceled. (4fcccd8), closes #2924
- defaultErrorHandler: log Error and Error.stack by default (e102a85)
- defaultErrorHandler: Reduce console.error noise when redirected (8c0344f)
- common: Add concrete import to interface.ts to fix unit tests (2d16740)
- redirect: fix bug where redirected transitions with reload: true got wrong resolve values copied (bd0e3a3)
- redirectTo: fix redirectTo definition (interface) (eff7195), closes #2871
- Rejection: Silence "Error: Uncaught (in Exception)" (38432f4), closes #2676
- Resolve: prevent RXWAIT from waiting for the observable to complete (a02caf3)
- ResolvePolicy: Fix resolve policy config loading (4440811), closes #2945
- stateService: change reloadState parameter in reload function is optional (#2973) (839dc4a)
- StateService: remove jQuery deprecated feature (fa40acc)
- trace: make TRANSITION trace less noisy when a transition is redirected (a65c58f)
- Trace: Fix error in console after $trace.enable() (013c77a), closes #2752
- transitionHook: Prevent queued hookFn to be called if deregistered (#2939) (39e1ba7), closes #2928
- typescript: Make UI-Router
noImplicitAny
safe. (0769bc2), closes #2693 - typescript: Remove angular1 specific types from ui-router-core methods (30124bd), closes #2693
ng1
- ng1.stateService: Coerce 'null'
params
value to empty object (f674151), closes #2952 - ng1.uiSref: Allow nested UISrefs by stopping event propagation on-click (b4a2499), closes #2962
- ng1.uiSrefActive: update sref-active after existing transition-in-progress completes (0994c71), closes #2908
- uiSref, uiState: added click unbind to prevent memory leaks (79d501e)
- uiView: separate $uiView and $uiViewAnim element.data() (a94117d), closes #2763
ng2
- ng2.pushState: Properly match urls when base path set (b9be2dc), closes #2745
- ng2.UIRouterConfig: Allow new UIRouter() to finish before configuring it (a151f71)
- ng2.uiSrefActive: Allow uiSrefActive on ancestor element. (874fc07), closes #2950
- ng2.uiSrefActive: don't puke on sref to invalid target state (c9b6570)
- ng2.UISrefActive: Use @ContentChildren to query for the nested UISref (999c42a), closes #2950
- ng2.UiView: fix input resolve binding (4f53f81)
- ng2.UIView: Make routed to component appear inside UIView, not next to it. (558fc80)