You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1351,9 +1363,9 @@ If you rely on the previous encoding, create a custom parameter type that implem
1351
1363
```js
1352
1364
urlMatcherFactory.type('tildes', {
1353
1365
encode: (val: any) =>
1354
-
val != null ? val.toString().replace(/(~|\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;
1366
+
val != null ? val.toString().replace(/(~|\/)/g, m => ({ '~': '~~', '/': '~2F' }[m])) : val;
1355
1367
decode: (val: string) =>
1356
-
val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;
1368
+
val != null ? val.toString().replace(/(~~|~2F)/g, m => ({ '~~': '~', '~2F': '/' }[m])) : val;
1357
1369
pattern: /[^/]*/
1358
1370
});
1359
1371
```
@@ -1463,28 +1475,28 @@ Major breaking changes for Angular 2 bootstrap between beta.2 and beta.3
1463
1475
- See https://ui-router.github.io/docs/latest/classes/ng2.uiroutermodule.html
1464
1476
1465
1477
@NgModule({
1466
-
imports: [
1467
-
UIRouterModule.forRoot({
1468
-
states: INITIAL_STATES,
1469
-
useHash: true,
1470
-
configClass: MyUIRouterConfig
1471
-
}),
1472
-
BrowserModule,
1473
-
FeatureModule,
1474
-
],
1475
-
declarations: INITIAL_COMPONENTS
1478
+
imports: [
1479
+
UIRouterModule.forRoot({
1480
+
states: INITIAL_STATES,
1481
+
useHash: true,
1482
+
configClass: MyUIRouterConfig
1483
+
}),
1484
+
BrowserModule,
1485
+
FeatureModule,
1486
+
],
1487
+
declarations: INITIAL_COMPONENTS
1476
1488
})
1477
1489
class RootAppModule {}
1478
1490
1479
1491
@NgModule({
1480
-
imports: [
1481
-
UIRouterModule.forChild({
1482
-
states: FEATURE_STATES,
1483
-
configClass: FeatureConfig
1484
-
}),
1485
-
CommonModule,
1486
-
],
1487
-
declarations: FEATURE_COMPONENTS
1492
+
imports: [
1493
+
UIRouterModule.forChild({
1494
+
states: FEATURE_STATES,
1495
+
configClass: FeatureConfig
1496
+
}),
1497
+
CommonModule,
1498
+
],
1499
+
declarations: FEATURE_COMPONENTS
1488
1500
})
1489
1501
1490
1502
@@ -1603,16 +1615,16 @@ This list is extensive, but typical users won't be affected by most of these cha
1603
1615
The most common breaks will be #1 and #2
1604
1616
1605
1617
1) BC-BREAK: renamed all Ui* (lowercase 'i') symbols to UI* (uppercase 'I') for more consistent naming.
1606
-
- UiView -> UIView
1607
-
- UiSref -> UISref (and related directives)
1608
-
- UiInjector -> UIInjector
1618
+
- UiView -> UIView
1619
+
- UiSref -> UISref (and related directives)
1620
+
- UiInjector -> UIInjector
1609
1621
1610
1622
2) BC-BREAK: Transition Hooks are no longer injected (onBefore/onStart/onExit/onRetain/onEnter/onFinish/onSuccess/onError)
1611
1623
1612
1624
Previously, a hook like `['$state', ($state) => $state.target('foo')]` would get `$state` injected.
1613
1625
Now, all hooks receive two parameters:
1614
-
- transition: the current Transition, which has an `injector()` function
1615
-
- state: for onEnter/onRetain/onExit hooks only, the State which the hook is being run for. This value will be null for onBefore/onStart/onFinish/onSuccess/onError hooks.
1626
+
- transition: the current Transition, which has an `injector()` function
1627
+
- state: for onEnter/onRetain/onExit hooks only, the State which the hook is being run for. This value will be null for onBefore/onStart/onFinish/onSuccess/onError hooks.
@@ -1632,7 +1644,7 @@ The most common breaks will be #1 and #2
1632
1644
1633
1645
8) BC-BREAK: remove support for `JIT` resolves. This also eliminated the need for the `loadAllControllerLocals` hook which was also removed
1634
1646
1635
-
9) BC-BREAK: Replaced `ViewConfig.node` with `ViewConfig.path`. Angular 1's `$(element).data('$uiView')` is affected.
1647
+
9) BC-BREAK: Replaced `ViewConfig.node` with `ViewConfig.path`. Angular 1's `$(element).data('$uiView')` is affected.
1636
1648
Previously the .node was the node for the view. Now the last element in the path is the node for the view.
1637
1649
1638
1650
10) BC-BREAK: Nodes no longer have (stateful) `.resolveContext` properties. Instead, a new ResolveContext is wrapped over a Path of Nodes. Removed `PathFactory.bindResolveContexts()`.
@@ -1850,11 +1862,11 @@ This is a maintenance release which fixes a few known bugs introduced in 0.2.16.
1850
1862
1851
1863
#### Bug Fixes
1852
1864
1853
-
* **$state:**
1865
+
* **$state:**
1854
1866
* statechangeCancel: Avoid infinite digest in .otherwise/redirect case. Don't clobber url if a new transition has started. Closes #222 ([e00aa695](https://github.com/angular-ui/ui-router/commit/e00aa695e41ddc5ebd5d2b226aa0917a751b11aa), closes [#2238](https://github.com/angular-ui/ui-router/issues/2238))
1855
1867
* transitionTo: Allow hash (#) value to be read as toParams['#'] in events. Re-add the saved hash before broadcasting $stateChangeStart event. ([8c1bf30d](https://github.com/angular-ui/ui-router/commit/8c1bf30d2a3b78ba40b330f12d854c885d6cc117))
1856
1868
* **$stateParams:** Fix for testing: reset service instance between tests ([2aeb0c4b](https://github.com/angular-ui/ui-router/commit/2aeb0c4b205baf6cfa2ef25bb986bb160dc13bf9))
1857
-
* **$urlRouter:**
1869
+
* **$urlRouter:**
1858
1870
* Sort URL rules by specificity. Potential minor BC if apps were relying on rule registration order. ([b5c57c8e](https://github.com/angular-ui/ui-router/commit/b5c57c8ec2e14e17e75104c1424654f126ea4011))
1859
1871
* Use $sniffer for pushstate compat check ([c219e801](https://github.com/angular-ui/ui-router/commit/c219e801797f340ef9c5c919ab890ef003a7a042))
1860
1872
* **UrlMatcher:**
@@ -1865,11 +1877,11 @@ This is a maintenance release which fixes a few known bugs introduced in 0.2.16.
1865
1877
* include the slash when recognizing squashed params in url ([b5130bb1](https://github.com/angular-ui/ui-router/commit/b5130bb1215e15f832ea6daa670410b9a950c0d4), closes [#2064](https://github.com/angular-ui/ui-router/issues/2064))
1866
1878
* Allow url query param names to contain periods ([d31b3337](https://github.com/angular-ui/ui-router/commit/d31b3337cc2ce71d87c92fdded629e46558d0b49))
1867
1879
* **reloadOnSearch:** Update `locals.globals.$stateParams` when reloadOnSearch=false ([350d3e87](https://github.com/angular-ui/ui-router/commit/350d3e87783a2263fd7d23913da34f1268c3300b), closes [#2356](https://github.com/angular-ui/ui-router/issues/2356))
1868
-
* **ui-view:**
1880
+
* **ui-view:**
1869
1881
* fix $animate usage for ng 1.4+ ([9b6d9a2d](https://github.com/angular-ui/ui-router/commit/9b6d9a2d0ce4ae08384165cb517bddea59b67892))
1870
1882
* change $viewContentLoading to pair with $viewContentLoaded ([f9b43d66](https://github.com/angular-ui/ui-router/commit/f9b43d66833f0e17de41fd8d1cc3b491e3ba4a0e), closes [#685](https://github.com/angular-ui/ui-router/issues/685))
1871
1883
* $destroy event is triggered before animation ends ([1be13795](https://github.com/angular-ui/ui-router/commit/1be13795686ab78abb2d5094bc8addcacb928975))
1872
-
* **uiSref:**
1884
+
* **uiSref:**
1873
1885
* Ensure URL once param checks pass ([9dc31c54](https://github.com/angular-ui/ui-router/commit/9dc31c5465328e5666468b0c2319ce205f4b72f8), closes [#2091](https://github.com/angular-ui/ui-router/issues/2091))
1874
1886
* uiSrefActive: update the active classes after linking directive ([7c914030](https://github.com/angular-ui/ui-router/commit/7c914030f13e05e45a941c1b723cb785db729890))
1875
1887
@@ -2058,7 +2070,7 @@ This release includes a lot of bug fixes around default/optional and typed param
2058
2070
* allow prevent syncUrl on failure ([753060b9](https://github.com/angular-ui/ui-router/commit/753060b910d5d2da600a6fa0757976e401c33172))
2059
2071
* **typescript:** Add typescript definitions for component builds ([521ceb3f](https://github.com/angular-ui/ui-router/commit/521ceb3fd7850646422f411921e21ce5e7d82e0f))
2060
2072
* **uiSref:** extend syntax for ui-sref ([71cad3d6](https://github.com/angular-ui/ui-router/commit/71cad3d636508b5a9fe004775ad1f1adc0c80c3e))
2061
-
* **uiSrefActive:**
2073
+
* **uiSrefActive:**
2062
2074
* Also activate for child states. ([bf163ad6](https://github.com/angular-ui/ui-router/commit/bf163ad6ce176ce28792696c8302d7cdf5c05a01), closes [#818](https://github.com/angular-ui/ui-router/issues/818))
2063
2075
* **BREAKING CHANGE** Since ui-sref-active now activates even when child states are active you may need to swap out your ui-sref-active with ui-sref-active-eq, thought typically we think devs want the auto inheritance.
0 commit comments