route params from angular to view store should be updated on routeChangeSuccess
This commit is contained in:
@@ -34,10 +34,7 @@ export class BridgeSrv {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.$rootScope.$on('$routeChangeSuccess', (evt, data) => {
|
this.$rootScope.$on('$routeChangeSuccess', (evt, data) => {
|
||||||
let angularUrl = this.$location.url();
|
store.view.updatePathAndQuery(this.$location.path(), this.$location.search(), this.$route.current.params);
|
||||||
if (store.view.currentUrl !== angularUrl) {
|
|
||||||
store.view.updatePathAndQuery(this.$location.path(), this.$location.search(), this.$route.current.params);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
reaction(
|
reaction(
|
||||||
@@ -45,7 +42,9 @@ export class BridgeSrv {
|
|||||||
currentUrl => {
|
currentUrl => {
|
||||||
let angularUrl = this.$location.url();
|
let angularUrl = this.$location.url();
|
||||||
if (angularUrl !== currentUrl) {
|
if (angularUrl !== currentUrl) {
|
||||||
this.$location.url(currentUrl);
|
this.$timeout(() => {
|
||||||
|
this.$location.url(currentUrl);
|
||||||
|
});
|
||||||
console.log('store updating angular $location.url', currentUrl);
|
console.log('store updating angular $location.url', currentUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user