Releases: angular-ui/ui-router
1.0.0 final
1.0.0-rc.1...1.0.0 (2017-04-30)
NOTICE: The npm package is renamed from angular-ui-router
to @uirouter/angularjs
Bug Fixes
- noImplicitAny: move noimplicitany compliance test file to correct location (ec6e5e4)
- onEnter: Fix typescript typing for onEnter/onRetain/onExit (df6ee24)
- routeToComponent: Bind resolves that start with data- or x- (4559c32)
- StateRegistry: Allow stateRegistry.register() to take a Ng1StateDeclaration (cc88525), closes #3345
- uiCanExit: Only process uiCanExit hook once during redirects (7a086ee)
- uiSref: replace angular.copy with extend (PR #3330) (20d1fcd), closes #3189
- UrlRouterProvider: export
UrlRouterProvider
symbol for use with .d.ts typings (d71bad0), closes #3296 - view: Allow targeting nested named ui-view by simple ui-view name (8fe5b1f)
- views: Allow same views object to be reused in multiple states (66103fc), closes #3353
- views: Better validation of view declarations (throw when there are state-level and view-level conflicts) (7573156)
Features
- uiSref: Bind ui-sref to other DOM events (PR #3343) (193ac2e), closes #3169
- uiSref: switch custom events prop from
event:
toevents:
(d3942a6)
UI-Router for AngularJS version 1.0.0 updates [email protected]
to @uirouter/[email protected]
.
Please keep reading to see if the breaking changes from core between 3.1.0 and 5.0.1 affect you.
@uirouter/core
changes 3.1.0...5.0.0 (2017-04-30)
Bug Fixes
- BrowserLocationConfig: fixed protocol + port value (#38) (5559382)
- lazyLoad: Allow
lazyLoad
stateBuilder: Get lazyLoad fn from internal State object, not StateDeclaration (9313880) - lazyLoad: Wait for future state to be replaced before registering lazy children (4bdce47)
- noImplicitAny: Fix noimplicitany compliance (1a6cdfc)
- pushStateLocation: call listeners in url() (#24) (7c90911), closes #23
- redirect: Do not update URL after redirect with { location: false } (652a760)
- resolve: Allow resolve's state context to be injected as
$state$
(a06948b) - tfs: Rename $q.ts and $injector.ts files, removing leading dollar signs (cb653ee)
- trace: Re-add transitionStart trace (b019036)
- transitionHook: Do not process transition hooks after router has been disposed. (666c6d7)
- TransitionHook: Transition hooks no longer expose the internal StateObject (2b0e48b)
- typings: Allow strictNullChecks for HookMatchCriteria (d92d4d5)
- ui-sref: Improve performance of generating hrefs (c3967bd)
- view: Do not throw when uiView doesn't have a state context (f76ee2a)
- view: Update views in order of ui-view depth and also by state depth (46dea2b)
Features
- abort: Add API to manually abort/cancel a transition (39f8a53)
- common: Perf improvements in hot functions: (4193244)
- core: Export all vanilla.* code from
ui-router-core
(f3392d1) - core: Switch to @uirouter/core npm module (e3f389f)
- decorators: Add state, resolve and resolve data decorators (642df0b)
- defaultErrorHandler: Do not invoke default error handler for ABORTED transitions (b07a24b)
- globals: Removed
UIRouterGlobals
interface. RenamedGlobals
class toUIRouterGlobals
(8719334) - Globals: implement Disposable and delete global transition data (a794018)
- onBefore: Run onBefore hooks asynchronously. (30b82aa)
- onEnter/Exit/Retain: Use onExit/onEnter/onRetain from 56955state(), not state.self (bc1f554)
- Rejection: Add $id to ease debugging of transition rejections (d456d54)
- State: Support registration of ES6 state classes (as opposed to object literals) (3a5d055)
- State: Switch Internal State Object to prototypally inherit from the State Declaration (027c995), closes #34
- StateObject: Rename internal
State
object toStateObject
(feceaf9) - StateRegistry: improve perf for:
.register()
andStateMatcher.find()
misses (fdb3ab9) - transition: Ignore duplicate transitions (double clicks) (bd1bd0b)
- transition: Improve supersede logic: Do not supersede if the new trans is aborted before onStart (3141a8f)
- transition: Run hooks synchronously in current stack, when possible (953e618)
- Transition: deprecate
Transition.is()
which was never implemented (1edff4b) - Transition: Normalize all transition errors to a Rejection. (a7464bb)
- UIRouter: Add
trace
global to theUIRouter
object (48c5af6) - UrlService: (
UrlRouter
) improve perf of registering Url Rules and sorting Url Rules (64fbfff) - UrlService: Add
rules.initial("/home")
to config initial state (like otherwise) (bbe4209) - View: Allow targeting views on own state using
viewname@.
(normalizeUIViewTarget) (7078216), closes #25
BREAKING CHANGES
TransitionHook: Transition hooks no longer expose the internal State
object (now named StateObject
)
Before:
import { State } from "ui-router-core";
const match = { to: (state: State) => state.data.auth };
transitionsvc.onEnter(match, (trans: Transition, state: State) => {
// state is the internal State object
if (state.includes["foo"]) { // internal ui-router API
return false;
}
}
Now:
import { StateDeclaration } from "ui-router-core";
const match = { to: (state: StateDeclaration) => state.data.auth };
transitionsvc.onEnter(match, (trans: Transition, state: StateDeclaration) => {
// state === the state object you registered
// Access internal ui-router API using $$state()
if (state.$$state().includes["foo"]) {
return false;
}
}
Motivation:
The State
object (now named StateObject
) is an internal API and should not be exposed via any public APIs.
If you depend on the internal APIs, you can still access the internal object by calling state.$$state()
.
BC Likelihood
How likely is this BC to affect me?
Medium: You will likely be affected you 1) have transition hooks, 2) are using typescript and/or 3) use the internal ui-router State API.
BC Severity
How severe is this BC?
Low: Access to the internal api is still available using $$state()
.
StateObject: Renamed internal API State
object to StateObject
Before:
import {State} from "ui-router-core";
-
Now:
import {StateObject} from "ui-router-core";
...
0.4.2
0.4.1
0.4.0
0.4.0 (2017-01-17)
Bug Fixes
- $state: Fix "Possibly unhandled rejection" by catch()ing the transition promise (f2910e9b, closes #3246, #2889)
- ui-sref-active-eq: Compare parameter values using typed parameters (67e4997e)
- uiView: do not leave initial view scope undestroyed (fix unhandled rejection) (5be98e04, closes #3164)
- urlMatcherFactory: Check for null in int.is() Fixes message: Cannot read property 'toString' of nul (61728d71, closes #3197)
Features
- $templateFactory: use $templateRequest from AngularJS (9a1af98), closes [#]
- $templateFactory: refactor to a Provider to have a $http/$templateRequest switch (7f1dec00)
BREAKING CHANGE: Use angular 1.3+ $templateRequest
service to fetch templates
We now fetch templates using $templateRequest
when it is available (angular 1.3+).
You can revert to previous template fetching behavior using $http
by configuring the ui-router $templateFactoryProvider
.
.config(function($templateFactoryProvider) {
$templateFactoryProvider.shouldUnsafelyUseHttp(true);
});
There are security ramifications to using $http
to fetch templates.
Read
Impact on loading templates
for more details.
1.0.0-rc.1 Release Candidate
This is the first release candidate of angular-ui-router. Note: ui-router-ng2 is no longer being released at the same time as angular-ui-router. This is a major release of angular-ui-router with lots of new features, and includes most of the remaining breaking changes required for a 1.0 final release.
If you're still using the 0.2.x or 0.3.x versions, this is a good time to migrate your codebase to the latest version. See the migration guide to get started. (Note: the migration guide will be updated with the breaking changes from this release ASAP).
The following list highlights the most notable changes in this release:
- Route-to-component
- Now supports binding to a child state component from the parent state's component through the
ui-view
tag (for handling events from dumb components, etc) - Now supports
"&"
callback bindings to functions returned by resolves
- Now supports binding to a child state component from the parent state's component through the
- Url Rules subsystem overhauled
- Now, the most relevant URL is matched, instead of the rule that was registered first ui-router/core#15
- Query parameters no longer encode slashes as
~2F
- New param types:
path
,query
,hash
- New param types:
- Hash parameter is cleared out on subsequent transitions (it is no longer an inherited param)
- Use
{ location: 'replace' }
when a URL redirect occurs. This eliminates the extra entry in the browser history. - Create a new
UrlService
($urlService
and$urlServiceProvider
). This service is a facade which consolidates the most commonly used URL APIs. The other URL apis still exist, but are marked as deprecated for public use. - Typescript definitions (
.d.ts
) are now compatible with Typescript 1.8.x - Implemented
NOWAIT
resolve policy (do not wait for promises; do not unwrap promises) ui-sref
/-active
- Links update when states are added/removed
- Params-only srefs work properly (only change params on the current state)
- ui-view
- States without any views (template or component) get a template of
<ui-view></ui-view>
allowing easier creation ofabstract
states
- States without any views (template or component) get a template of
- Use
$templateRequest
by default to fetch templates - Lazy Load
- More flexible lazy loading (lazy load anything: states, components, services -- whatever you need)
- Imperative lazy loading (can be used to pre-load lazy states)
- Bugfixes
1.0.0-rc.1 (2017-01-09)
Bug Fixes
- Post-process .d.ts files to make them compatible with TS 1.8 (c8162ee), closes #3070
- $stateChangeSuccess: fire polyfill
$stateChangeSuccess
right after global state are updated (3984f9b), closes #3144 - $viewContentLoading: Add $viewContentLoading event back (c346a28)
- build: Use global
angular
reference if require('angular') is falsey or empty (2982613), closes #3113 - component: Do not throw err when component has
&
binding (b5c731d), closes #3099 - Ng1ViewDeclaration: Make controllerProvider IInjectable (#3056) (a3136ae), closes #3044
- ng2.uiSrefActive: Allow ng-if on nested uiSrefs (e3051f5), closes #3046
- onExit: inject resolve values using the "from path" (c91b65a)
- onExit: inject the current transition as
$transition$
(c91b65a), closes #3081 - package: use engines: node: >=4.0.0 (6801b0c), closes #3086
- Resolve: Fix NOWAIT resolve injection into controllers and bindings to components. (cb57ce9)
- typings: Change Ng1ViewDeclaration.controller type to IInjectable|string (d2b5d84), closes #3089
- typings: Change Ng1ViewDeclaration.controller type to IInjectable|string (8e91dc9)
- ui-sref: Update
ui-sref/state
href when states are added/removed (389dfd5) - ui-sref: Update params-only sref when state changes (3c1bd0e), closes #1031 #2541
- ui-sref: Use either .on or .bind for click handlers (b00f044), closes #3035
- ui-sref-active: Add CSS class immediately (avoid delay) (27eb5e9), closes #2503
- ui-sref-active: Avoid add/remove class race condition (126a4ad)
- ui-sref-active: Use
$scope.$evalAsync
to apply css class (6a9d9ae), closes #2503 #1997 #2503 #1997 - ui-state: Process ui-state links relative to where they are created (cae4dc4)
- ui-state: Support one time bindings in ng 1.3 (389dfd5), closes #3131 #3054
- uiView: do not leave initial view scope undestroyed (#3164) (37d6f9a), closes #1896
Features
- bundle using rollupjs for smaller bundle and faster init times (a4b5500)
- Deprecate public use of
$urlRouter
and$urlMatcherFactory
in favor of$urlService
(6ee7f21) - Move imperative
$resolve
service out of main bundle (cae6d03) - remove component.json (af736c4)
- Use angular 1.3+
$templateRequest
service to fetch templates (7e1f36e), closes #3193 #1882 - $uiRouter: expose router instance at config-time as
$uiRouterProvider.router
(9d2661c) - injectables: Expose
$uiRouterProvider
,$uiRouterGlobals
, and$stateRegistry
injectables (7fa72a6) - ui-sref-active: improve performance by reducing $watches (126a4ad)
- ui-view: Route-to-component: Wire component "&" bindings (af95206), closes #3239 #3111
- UrlService: Create UrlService API (facade) for easier access to URL based APIs (6ee7f21)
- view: A view without anything to render defaults to
<ui-view></ui-view>
(7d28fdd), closes #3178 - view: Route a view to a directive using
componentProvider
(#3165) (090d2e3)
BREAKING CHANGES
BREAKING CHANGE: Deprecate public use of $urlRouter
and $urlMatcherFactory
in favor of $urlService
The UrlService
combines the commonly used URL APIs in a single place.
The service may be injected in a run block as $urlService
, or in a config block as $urlServiceProvider
.
The service object has two nested API objects, rules
and config
. An example usage is $urlService.rules.otherwise('/home')
The existing API for $urlRouter
and $urlMatcherFactory
will continue to function as before, but are now considered an "internal API".
The new $urlService
is a facade which delegates to the appropriate internal APIs.
BREAKING CHANGE: Use angular 1.3+ $templateRequest
service to fetch templates
We now fetch templates using $templateRequest
when it is available (angular 1.3+).
You can revert to previous template fetching behavior using $http
by configuring the ui-router $templateFactoryProvider
.
.config(function($templateFactoryProvider) {
$templat...
0.3.2
(2016-11-03) diff
Bug Fixes
- $state.transitionTo: trigger $stateChangeCancel appropriately (#3039) (ca7c366), closes #3027
- promise: avoid uncaught in promise errors due to transition rejections (66ab048), closes #2889
- state.includes: compare param vals using typed parameter (not using
==
) (6958c24), closes #2696 - stateDirective: using on to attach an event handler instead of bind (#3036) (a8aa40a)
- urlMatcherFactory: fix tilde edge case with "string" encoding (#3021) (953235a)
1.0.0-beta.3
(2016-09-23) diff
This release adds Angular 2.0.0 final support.
It changes the NgModule mechanism to use UIRouterModule.forRoot()
and UIRouterModule.forChild()
.
See the blog and the breaking changes section.
Bug Fixes
This release fixes bugs for both ng1 and ng2
- common: Remove
url()
from LocationService interface (#2990) (d6c2580) - lazyLoad: Always delete the lazy load promise after it settles. (dd2f101)
- ng1.StateProvider: Export StateProvider class so type can be used (167770d)
- ng1.uiView: Remove deprecated jquery functions bind/unbind in favor of on/off (60ebd44)
- ng2: Angular 2.0.0 final compatibility (7c54b75), closes #2991
- ng2.NgModule: Allow apps with no forChild modules (d3bd332), closes #3009
- ng2.uiView: Use ReflectorReader to get component inputs
- resolve: Don't re-resolve data when redirected to same state, but only dynamic params changed. (98cd2d2), closes #3033
- trace: Show function definition during logging of trace.enable('HOOK') (190d122)
- transition: Fail a transition if a new one has started while resolves are loading (bc87d9e), closes #2972
- urlMatcherFactory: fix tilde edge case with "string" encoding (#3018) (a201906)
- viewService: Allow root ui-view to be wrapped in ng-if (32f718a), closes #3004
Features
- StateBuilder: Calculate parent state name when ends in two wildcards
**
(b4621f3)
BREAKING CHANGES
BC in Core
- Remove
UIInjector.native
infavor ofUIInjector.getNative()
(d11b7dc) - Remove
stateProvider
from ui-router-core. UsestateRegistry
andstateService
in 88c6494 - We now enforce states with an explicit
parent:
may NOT ALSO specify a parent state in their name (i.e.,parent.child
)
BC in Angular 2
Major breaking changes for Angular 2 bootstrap between beta.2 and beta.3
- Removed
@UIRouterModule
decorator. - Added
UIRouterModule.forRoot()
andUIRouterModule.forChild()
factory methods - See https://ui-router.github.io/docs/latest/classes/ng2.uiroutermodule.html
@NgModule({
imports: [
UIRouterModule.forRoot({
states: INITIAL_STATES,
useHash: true,
configClass: MyUIRouterConfig
}),
BrowserModule,
FeatureModule,
],
declarations: INITIAL_COMPONENTS
})
class RootAppModule {}
@NgModule({
imports: [
UIRouterModule.forChild({
states: FEATURE_STATES,
configClass: FeatureConfig
}),
CommonModule,
],
declarations: FEATURE_COMPONENTS
})
1.0.0-beta.2
(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)
UI-Router 1.0 beta release
(2016-06-30) diff
UI-Router has a new home
BREAKING CHANGES
These breaking changes are for users upgrading from a 1.0 alpha, not for those upgrading from the 0.x legacy series.
This list is extensive, but typical users won't be affected by most of these changes.
The most common breaks will be #1 and #2
- BC-BREAK: renamed all Ui* (lowercase 'i') symbols to UI* (uppercase 'I') for more consistent naming.
- UiView -> UIView
- UiSref -> UISref (and related directives)
- UiInjector -> UIInjector
-
BC-BREAK: Transition Hooks are no longer injected (
onBefore/onStart/onExit/onRetain/onEnter/onFinish/onSuccess/onError
)Previously, a hook like
['$state', ($state) => $state.target('foo')]
would get the$state
service injected.Now, all hooks receive two parameters:
-
transition
: the currentTransition
, which has aninjector()
function -
state
: foronEnter/onRetain/onExit
hooks only, theState
which the hook is being run for. This value will benull
foronBefore/onStart/onFinish/onSuccess/onError
hooks.Refactor your hooks:
-
from:
['$state', 'mySvc', ($state, mySvc) => mySvc.foo() ? $state.target('foo')] : true
-
to:
(trans) => trans.injector().get('mySvc').foo() ? trans.router.stateService.target('foo') : true
Note: for backwards compatiblity, angular 1
onEnter/onExit/onRetain
hooks declared on a state object are still injected
- BC-BREAK: Removed
Transition.resolves()
in favor ofTransition.getResolveValue(token)
andTransition.getResolveTokens()
This change is necessary to support injection tokens of arbitrary types, not just strings.
-
BC-BREAK: - The (internal API) State object's .resolve property is now an array of Resolvables, built from state definitions by the StateBuilder. This object is an internal representation, and not generally accessed by end users.
-
BC-BREAK: - Removed the default resolve called
$resolve$
, which was added in a previous alpha. -
BC-BREAK: -
Transition.addResolves()
replaced withTransition.addResolvable()
-
BC-BREAK: remove
ResolveContext.getResolvables()
in favor of.getToken()``and
.getResolvable()` -
BC-BREAK: remove
ResolveContext.invokeLater()
and.invokeNow()
-
BC-BREAK: remove support for
JIT
resolves. This also eliminated the need for theloadAllControllerLocals
hook which was also removed
- Previously, a resolve would be fetched "just in time", if it was injected into a transition hook. This allowed you to inject even a LAZY resolve in an `onStart` hook (a LAZY resolve is normally fetched during the `onEnter` phase).
- Since hooks are no longer injected, you have to explicitly tell a resolvable to fetch if you want to use it before its fetch lifecycle. This will be possible in beta.2 which will introduce `transition.getResolvable()`
```
transitionService.onStart({}, function(transition) {
return transition.getResolvable('foo').get().then(foo => {
// do something with resolve value
});
});
```
-
BC-BREAK: Replaced
ViewConfig.node
withViewConfig.path
. Angular 1's$(element).data('$uiView')
is affected.
Previously the .node was the node for the view. Now the last element in the path is the node for the view. -
BC-BREAK: Nodes no longer have (stateful)
.resolveContext
properties. Instead, a new ResolveContext is wrapped over a Path of Nodes when needed. RemovedPathFactory.bindResolveContexts()
. -
BC-BREAK: ResolveContext.resolvePath returns a promise for resolved data as an array of tuples, instead of a promise for an object of resolved data. Removed
ResolveContext.resolvePathElement()
. -
BC-BREAK: Removed ResolvePolicy enum in favor of the ResolvePolicy interface
{ when: "", async: "" }
-
BC-BREAK: renamed
ResolveContext.isolateRootTo
tosubContext
-
BC-BREAK: rename
UIRouterGlobals
class toGlobals
; addUIRouterGlobals
back as an interface -
BC-BREAK: Moved
defaultErrorHandler
fromTransitionService
toStateService
Features
- Resolve: Switch state.resolve to be an array of Resolvables (6743a60)
- Resolve: support ng2-like provide object literals. Support injection of arbitrary tokens, not just strings. (a7e5ea6)
- Resolve: support ng2-like provide object literals (a7e5ea6)
- Transition: expose the current
UiRouter
object as a public property (52f1308) - redirectTo: Process
redirectTo
property of a state as a redirect string/object/hook function (6becb12), closes #27 #948 - rejectFactory: separate transition aborted and transition errored reject types (55995fd)
- ParamType: allow a custom parameter Type to specify a default value for a parameter's
dynamic
property - Resolvable: Added a new Resolve Policy 'RXWAIT'. If an Observable is returned, pass the observable as the value, but also wait for it to emit its first value
Bug Fixes
- ng2.pushState: Properly match urls when base path set (b9be2dc), closes #2745
- ng2.UIRouterConfig: Allow new UIRouter() to finish before configuring it (a151f71)
- ng2.UiView: fix input resolve binding (4f53f81)
- ng2.UIView: Make routed to component appear inside UIView, not next to it. (558fc80)
- redirect: fix bug where redirected transitions with reload: true got wrong resolve values copied (bd0e3a3)
- Rejection: Silence "Error: Uncaught (in Exception)" (38432f4), closes #2676
- Trace: Fix error in console after $trace.enable() (013c77a), closes #2752
- ng2.UIView: Trigger change detection once for routed components